* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow-x: hidden;
  font-family: sans-serif;
  background-color: #000022;
  color: #ccccff;
}

body {
  display: flex;
  flex-direction: column;
}

header, footer {
  background-color: #000033;
  color: #ccccff;
  padding: 0.5em 1em;
  z-index: 1000;
}

header {
  position: relative; /* Needed for absolute nav positioning */
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: #111;
  color: white;
  border-bottom: 2px solid #333;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-logo {
  height: 40px;
  width: auto;
  display: block;
}

.site-header h1 {
  margin: 0;
  font-size: 1.5rem;
  flex-grow: 1;
}

.site-header nav {
  display: flex;
  gap: 1rem;
}

footer {
  position: sticky;
  bottom: 0;
  text-align: center;
  border-top: 1px solid #444466;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
}

.header-top h1 {
  font-size: 1.2em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 90vw;
  color: #ccccff;
}

/* Navigation menu */
nav.menu {
  display: flex;
  gap: 1em;
  padding: 0.5em 0;
  flex-wrap: wrap;
}

nav.menu a {
  color: #66ccff;
  text-decoration: none;
  font-size: 1em;
  transition: color 0.4s ease, opacity 0.4s ease;
  opacity: 1;
}

/* Hover effect for menu links */
nav.menu a:hover {
  color: #aaddff; /* lighter blue on hover */
  opacity:0.8;
  /* text-decoration: none;  subtle underline on hover */
  text-decoration-line: underline;
  text-decoration-style: wavy;
/*  border-bottom: 1px solid #66ccff;  highlight underline */
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

/* Active menu item */
nav.menu a.active {
  color: #ffffff; /* bright white for active */
/*  font-weight: bold;*/
/*  border-bottom: 1px solid #aaddff;  highlight underline */
  pointer-events: none; /* optional: disable clicking on current page */
}

.menu-toggle,
.menu-icon {
  display: none;
}

main {
  flex: 1 1 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

section.plugin {
  flex: 1; /* takes all remaining horizontal space */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: #000022;
}

.plugin-header {
  background-color: transparent;
  padding: 0.5em 1em;
  position: sticky;
  top: 0;
  z-index: 900;
  border-bottom: 1px solid #444466;
  text-align: right;
}

.plugin-header h1 {
  color: #ccccff;
  font-size: 1.5em;
  font-weight: lighter;
}

.plugin-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 1em;
}

/* Scrollbar */
.plugin-body::-webkit-scrollbar {
  width: 8px;
}
.plugin-body::-webkit-scrollbar-thumb {
  background-color: transparent;
  border-radius: 4px;
}
.plugin-body::-webkit-scrollbar-track {
  background-color: #000022;
}

/* Logo styling */
.site-logo {
  height: 32px;
  width: auto;
  display: block;
}

/* Adjust spacing between logo and title */
.header-top {
  gap: 0.5em;
}

.hidden {
    display: none !important;
}


main {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}


main {
  display: flex;
  flex-direction: row;
  height: 100vh; /* full viewport height */
  overflow: hidden; /* prevent scrollbars inside main */
  position: relative;
}

/* Side menu styling */

aside.side-menu {
  width: 220px; /* or your preferred width */
  height: 100%; /* exactly same height as main */
  /*background-color: #000033;*/
  color: #ccccff;
/*  border-right: 1px solid #444466; */
  position: relative; /* relative inside main */
  overflow-y: auto; /* allow vertical scroll inside sidebar if needed */
  box-sizing: border-box;
  padding: 1rem;
}

/* Let sections take remaining space */
section.plugin {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background-color: #000022;
  overflow: hidden;
}

aside.side-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

aside.side-menu li {
  margin: 0;
}

aside.side-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: #aaddff;
  text-decoration: none;
  border-left: 4px solid transparent;
  transition: all 0.3s ease;
  border-radius: 4px;
}

aside.side-menu a:hover {
  background-color: #111144;
  color: #ffffff;
  border-left: 4px solid #66ccff;
}

aside.side-menu a.active {
  background-color: #222255;
  color: #ffffff;
  border-left: 4px solid #ffffff;
  font-weight: bold;
}
  
.side-menu nav a.active {
  background-color: #111144;
  color: #ffffff;
  font-weight: bold;
  border-left: 3px solid #66ccff;
  padding-left: 0.5em;
}


aside.side-menu {
  position: absolute;
  top: 50px; /* assuming header height is 50px, adjust as needed */
  left: 0;
  height: calc(100% - 50px);
  background-color: rgba(0, 0, 51, 0.8);
  color: white;
  transition: width 0.3s ease;
  overflow-x: hidden;
  z-index: 800;
  padding-top: 3em;
  /*width: 40px;  collapsed width: just enough for ">" icon */
  width:250px;
}

aside.side-menu.expanded {
  width: 250px; /* full width when expanded */
}

.side-menu nav a {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

aside.side-menu:not(.expanded) {
  width: 2em;
}

/* Style for the toggle button inside the sidebar */
.side-menu .toggle-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  user-select: none;
}

/* Hide the menu items when collapsed */
aside.side-menu:not(.expanded) nav ul {
  display: none;
}

/* When expanded, show the menu */
aside.side-menu.expanded nav ul {
  display: block;
  padding-left: 10px;
}

.with-aside-menu {
  padding-left: 3em;
}

#about .plugin-body {
  margin-left: 15%;
  margin-right: 15%;
}

/* Mobile layout tweaks */
@media (max-width: 600px) {
  .menu-icon {
    display: block;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0.25em 0.5em;
 /*   border: 1px solid #444466;
    border-radius: 4px;*/
    background: #000033;
    color: #ccccff;
  }

  nav.menu {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 3.0s ease-out, opacity 1.0s ease-out;
    flex-direction: column;
    gap: 0.5em;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgb(0, 0,51,0.8);
    z-index: 999;
    padding: 0 1em;
    border-bottom: 1px solid #444466;
    pointer-events: none;
  }

  .menu-toggle:checked ~ nav.menu {
    max-height: 500px; /* Large enough for full menu */
    opacity: 1;
    padding: 0.5em 1em;
    pointer-events: auto;
  }

  .header-top {
    flex-direction: row;
    gap: 1em;
    align-items: center;
  }

  .header-top h1 {
    font-size: 1em;
    max-width: 70vw;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-logo {
    height: 32px;
  }

  .site-header h1 {
    font-size: 1.2rem;
  }

    .site-logo {
    height: 40px;
  }
}


.info-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 0.4em 0.8em;
  background-color: var(--section-bg);
  padding: 1em;
  border: 1px solid var(--border-color);
}

.info-name {
  margin:0;
  font-weight: bold;
  text-align: right;
  color: var(--fg-color);
  word-break: break-word;
}

.info-value {
  margin:0;
  color: var(--accent-color);
  word-break: break-word;
}

.info-grid > div:nth-child(4n+1),
.info-grid > div:nth-child(4n+2) {
  background-color: rgba(255, 255, 255, 0.015);
}

@media (max-width: 600px) {
  .info-grid {
    gap: 0;
    grid-template-columns: 1fr;
  }

  .info-name {
    text-align: left;
  }

  .info-name::after {
    content: ":";
    padding-left: 0.2em;
  }

  nav ul {
    flex-direction: column;
    gap: 0.5em;
  }

  #about .plugin-body {
    margin-left: 5%;
    margin-right: 5%;
  }
}
