:root {
  --primary-color: rgb(0 35 60);
  --secondary-color: rgb(8 76 110);
  --section-color: rgba(255, 255, 255, 0.1);
  --text-color: rgb(249 247 233);
}
* {
  margin: 0px;
  padding: 0px;
  scrollbar-width: thin;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100%; /* exactly 100%, no min-height */
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background-color: var(--secondary-color);
  overflow: scroll;
  overflow-x: hidden;
}
header {
  display: flex;
  align-items: center;
  justify-content: start;
  background: url("img/navbar_bg.svg");
  background-size: cover;
  color: var(--text-color);
  text-align: center;
  height: 100px;
  width: 100%;
  flex: 0 0 auto; /* don't grow or shrink */
}
header img.logo {
  width: 80px;
  height: 80px;
  margin-right: 20px auto;
  border-radius: 10px;
  pointer-events: none;
  user-select: none;
  margin: 10px;
  order: -1; /* move to front */
}
header nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-height: 100%;
}
header nav ul {
  display: flex;
  justify-items: center;
  align-items: center;
  list-style: none;
  margin: 0 15px;
  height: 100%;
}
header nav ul li {
  margin: 0px 0.5em;
}
header nav ul li a {
  display: flex;
  text-decoration: none;
  justify-items: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 0.5em 1em;
  color: white;
  font-weight: bold;
  font-size: 1em;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
}
header nav ul li a:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
header nav ul li a:active {
  transform: translateY(0);
  background: rgba(255, 255, 255, 0.08);
}

.apps-button {
  flex-direction: column;
  margin: 0 10px 0 auto;
}
.apps-toggle {
  font-size: 1.4em;
  font-weight: bolder;
  color: var(--text-color);
  text-align: center;
  background-color: var(--primary-color);
  padding: 20px;
  border-radius: 10px;
  min-width: 70px;
  width: auto; /* Fixed: set width */
  cursor: pointer;
  border: none;
}
.apps-toggle::after {
  content: "Apps";
  position: absolute;
  transform: translateX(calc(-50% + 15px));
  font-weight: normal;
  z-index: 100;
  cursor: default;
  user-select: none;
  font-size: 0.6em;
  display: none;
  padding: 10px;
  margin-top: 30px;
  opacity: 0;
  background-color: var(--primary-color);
  border-radius: 10px;
}
.apps-toggle:hover::after {
  opacity: 0.7;
  display: block;
}

.apps-menu {
  display: block;
  position: absolute;
  background-color: var(--primary-color);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  z-index: 10;
  margin-top: 15px;
  padding: 15px;
  transform: translateX(calc(-50% - 45px));
}
.apps-menu.hide {
  display: none;
}
.apps-menu.show {
  display: block;
}
.apps-menu-header {
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 10px;
  color: var(--text-color);
  text-align: center;
}
.apps-menu-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  justify-items: center;
  align-items: center;
  gap: 10px;
}
.apps-menu-item a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 10px;
  border-radius: 8px;
  background: var(--section-color);
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  width: 80px;
  height: 80px;
}
.apps-menu-item a:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.apps-menu-item a img {
  pointer-events: none;
  user-select: none;
}
main {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-color);
  flex: 1 0 auto; /* grow to fill space, don't shrink */
  width: 100%;
  margin-bottom: 15px;
}

.menu-button {
  display: none;
}

#page-info,
#page-banner {
  width: 1000px;
  max-width: 1000px;
  margin-top: 15px;
  background-color: var(--section-color);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
#ad-banner-section {
  background-color: var(--section-color);
  border-radius: 10px;
  height: 50px;
  background: repeating-linear-gradient(
    45deg,
    #b073c6 0px,
    #b073c6 25px,
    #c58dd6 25px,
    #c58dd6 50px,
    #daa7e6 50px,
    #daa7e6 75px,
    #c58dd6 75px,
    #c58dd6 100px
  );
  background-size: 141px 141px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  animation: barberpole 2s linear infinite;
}

#ad-banner-section a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: bolder;
  font-size: 2em;
  display: block;
  padding: 10px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  letter-spacing: 3px;
  z-index: 1;
  transition: transform 0.2s;
  text-align: center;
}
#ad-banner-section a:hover {
  transform: scale(1.05);
}

#nav-ad {
  width: 100%;
  margin-right: 10px;
  overflow: hidden;
}
#ad-top-section {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 80px;
  background-color: var(--section-color);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  background: repeating-linear-gradient(
    45deg,
    #b073c6 0px,
    #b073c6 25px,
    #c58dd6 25px,
    #c58dd6 50px,
    #daa7e6 50px,
    #daa7e6 75px,
    #c58dd6 75px,
    #c58dd6 100px
  );
  background-size: 141px 141px;
  animation: barberpole 2s linear infinite;
}

#ad-top-section iframe {
  display: block;
  height: 100%;
  border-radius: 10px;
}

.info-before-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: start;
  position: absolute;
  font-size: 1em;
  z-index: 1;
  border-radius: 10px;
  height: 100%;
  width: 100%;
  background: linear-gradient(to right, rgb(0, 0, 0), rgba(0, 0, 0, 0));
}
.info-before-section h1 {
  color: var(--text-color);
  opacity: 0.9;
  text-shadow: 3px 3px 10px rgba(145, 145, 145, 0.5);
  font-size: 2em;
  margin-bottom: 10px;
  margin-left: 20px;
  user-select: none;
}
.info-banner {
  position: relative;
  display: flex;
  height: 100px;
  width: 1000px;
  flex-direction: column;
  align-items: left;
  border-radius: 10px;
  overflow: hidden;
}
.info-banner-img {
  border-radius: 10px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  filter: blur(2px);
}

.page-info-section {
  padding: 10px;
  font-size: 0.9em;
}
footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-color);
  color: var(--text-color);
  position: relative;
  width: 100%;
}
footer nav {
  display: flex;
  width: 100%;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  border-top: 1px solid white;
  margin: 15px 0 30px 0;
  padding-top: 15px;
}
footer nav ul {
  display: flex;
  justify-items: center;
  align-items: center;
  list-style: none;
  height: 100%;
}
footer nav ul li a {
  display: flex;
  text-decoration: underline;
  justify-items: center;
  align-items: center;
  padding: 0.5em 1em;
  color: white;
  font-size: 1em;
  transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  transition: color 0.3s, text-decoration 0.2s;
}
footer nav ul li a:hover {
  text-decoration: none;
  color: lightgray;
  transition: color 0.3s, text-decoration 0.2s;
}
footer p {
  margin-top: 15px;
  font-size: 0.9em;
}

@media (max-width: 1200px) {
  /* Container div for the menu button */
  .menu-button {
    display: block; /* show on mobile */
  }

  /* The actual button element inside the container */
  .menu-toggle {
    font-size: 1.4em;
    color: var(--text-color);
    display: block;
    text-align: center;
    background-color: var(--primary-color);
    padding: 20px;
    margin-left: 10px; /* Fixed: added px unit */
    border-radius: 10px;
    min-width: 70px;
    width: auto; /* Fixed: set width */
    cursor: pointer;
    border: none;
  }
  header {
    display: flex;
    flex-direction: row; /* normal left-to-right */
    align-items: center;
  }
  /* Active state - show the nav */
  .main-nav.active {
    display: flex !important;
    position: fixed; /* fixed so it’s relative to viewport */
    top: 0; /* starts below header */
    left: 0;
    height: 100%; /* full viewport minus header height */
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(
      to bottom,
      var(--primary-color),
      var(--secondary-color)
    );
    width: 50%; /* Changed from fixed 200px */
    min-height: 100%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding-top: 30px; /* Push down below header */
  }
  .main-nav.active .menu-button {
    margin-right: auto;
  }
  .main-nav.active nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  header img.logo {
    width: 80px;
    height: 80px;
    margin: 10px;
    order: 0;
  }
  header h2 {
    font-size: 1em;
  }
  header nav {
    display: none; /* hide the normal nav */
    width: 100%;
  }
  header nav ul {
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 20px 0; /* Added vertical padding */
    margin: 0;
  }

  header nav ul li {
    margin: 5px 0;
    width: 90%; /* Reduced for better mobile appearance */
  }

  header nav ul li a {
    display: block;
    text-align: center;
    padding: 15px 10px; /* Increased padding */
    border-radius: 8px; /* Added border radius for better appearance */
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--section-color);
  }
  .info-banner,
  .info-banner-img {
    width: 100%;
    height: 80px;
  }

  #page-info,
  #page-banner {
    width: 90%;
    max-width: none;
  }

  .info-before-section {
    align-items: center;
  }
  #ad-banner-section a {
    font-size: 1em;
  }
}
@keyframes barberpole {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 141px 0;
  }
}
