:root {
  --arr-purple: #bb90db;
  --arr-pink: #f8eeff;
}

body {
  font-family: sans-serif;
  background-color: #181818;
  color: #eee;
  margin-left: 230px; /* Same as sidebar width */
  margin-top: 0px;
  margin-bottom: 0px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

/* Main content grows to fill space */
main {
  flex: 1 0 auto;
}

/* Footer stays at the bottom */
footer {
  margin-top: auto;
  width: 100%;
  text-align: center;
  position: relative;
  bottom: 0;
  font-size: 0.8rem;
  color: #ccc;
}

/* Add to your stylesheet.css and profiles.css */
h2 {
  font-size: 2em;
  font-weight: bold;
  text-align: center;
  margin: 0.5em 0 1em 0;
}
h3 {
  margin: 0em 0em 0.5em 0em;
}
h4 {
  margin: 1em 0em 0.3em 0em;
}
img {
  border: 5px solid #bb90db;
}
a {
  color: #fff;
}
button.button {
  background-color: var(--arr-purple);
  border: none;
  padding: 10px;
  margin: 4px 2px;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  display: inline-block;
  font-size: 16px;
  cursor: pointer;
}

select {
  border: none;
  padding: 10px;
  margin: 4px 2px;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  display: inline-block;
  font-size: 16px;
  cursor: pointer;
}

/* Sidebar styles */
.sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: #222;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 2em;
  margin-right: 1em;
  z-index: 1000;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
  box-sizing: border-box; /* Add this to include padding in width */
  overflow: hidden;       /* Prevent children from overflowing */
}
.sidebar ul {
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center; /* Center list items horizontally */
}
.sidebar li {
  width: 100%;
  text-align: center; /* Center text inside each li */
  margin-bottom: 1em;
  box-sizing: border-box;
}
.sidebar a {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  color: #fff;
  text-decoration: none;
  font-size: 1.2em;
  padding: 0.1em;
  transition: background 0.2s;
  text-align: center; /* Center link text */
}
.sidebar a:hover {
  background: #444;
}
.sidebar-legal-link {
  margin-top: auto;
  margin-bottom: 1em;
  color: #bbb;
  font-size: 1em;
  text-align: center;
  text-decoration: none;
  width: 100%;
  display: block;
  padding: 0.5em 0;
  transition: color 0.2s, background 0.2s;
}
.sidebar-legal-link:hover {
  color: #fff;
  background: #444;
}

#sidebar-version {
  width: 100%;
  text-align: center;
  font-size: 0.8em;
  color: #888;
  margin-bottom: 1em;
}

.sidebar-collapsible {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2em;
  width: 100%;
  text-align: center; /* Center text */
  padding: 0.5em 1em;
  cursor: pointer;
  transition: background 0.2s;
  display: block;
}

.sidebar-collapsible-icon {
  font-size: 1em;
  margin-left: 0.5em;
  vertical-align: middle;
}

.sidebar-collapsible-content {
  width: 100%;
  background: #222;
  box-sizing: border-box;
  padding-left: 0;
}

.sidebar-collapsible-content li {
  margin-bottom: 0.2em;
  text-align: center;
}

.sidebar-collapsible-content a {
  font-size: 0.95em;
  padding: 0.2em 0.5em;
  color: #bbb;
  text-decoration: none;
  display: block;
  transition: background 0.2s;
}

.sidebar-collapsible-content a:hover {
  background: #333;
  color: #fff;
}

/* 🔹 Top-level categories (normal links like Profiles, Rules, OR buttons like Resources) */
.sidebar ul > li.active > a,
.sidebar ul > li.active > button {
  font-weight: bold;
  font-size: 1.3em;   /* only top-level grows */
  color: var(--arr-purple);
}

/* 🔹 Sub-links (like How To Start, specific rules, etc.) */
.sidebar ul li ul li.active > a {
  font-weight: bold;
  font-size: 1em;     /* stays same size */
  color: var(--arr-purple);
}

#sidebar-hamburger {
  font-size: 1em;
  position: fixed;
  padding: 10px 15px;
  margin: 0 1em 1em 1em;
}

/* When sidebar is open, move hamburger to the right of sidebar */
#sidebar-hamburger.sidebar-open {
  left: 220px; /* Sidebar width (230px) */
}

/* When sidebar is closed, move hamburger to the left*/
#sidebar-hamburger.sidebar-closed {
  left: 0;
}