/* Floating menu container: always vertically centered */
.floating-menu-container {
  position: fixed;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  z-index: 10010;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Collapsed state: only show burger icon */
.floating-menu-container.collapsed .menu-category {
  display: none;
}
.floating-menu-container.collapsed .collapsed-menu {
  display: flex;
  align-items: center;
  justify-content: center;
}

.collapsed-menu {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(26, 95, 122, 0.8);
  color: white;
  text-align: center;
  line-height: 50px;
  cursor: pointer;
  font-size: 24px;
  transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
}

.collapsed-menu:hover {
  transform: scale(1.1);
  opacity: 1;
  background-color: rgba(22, 160, 133, 0.9);
}

.menu-toggle-label {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50% !important;
  cursor: pointer;
  font-size: 24px;
  color: white;
  opacity: 0.9;
  background-color: rgba(255,255,255,0.15);
  transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
}

.menu-toggle-label:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* Example color classes for menu buttons with transparency */
.home-button .menu-toggle-label { background: rgba(26,95,122,0.7) !important; color: #fff; }
.search-button .menu-toggle-label { background: rgba(22,160,133,0.7) !important; color: #fff; }
.donation-button .menu-toggle-label { background: rgba(241,196,15,0.7) !important; color: red; }
.random-button .menu-toggle-label { background: rgba(255,165,0,0.7) !important; color: #fff; }
.poems-button .menu-toggle-label { background: rgba(41,128,185,0.7) !important; color: #fff; }
.originals-button .menu-toggle-label { background: rgba(155,89,182,0.7) !important; color: #fff; }
.playlists-button .menu-toggle-label { background: rgba(39,174,96,0.7) !important; color: #fff; }
.username-button .menu-toggle-label { background: rgba(52,73,94,0.7) !important; color: #fff; }

/* Hide the checkbox */
.menu-toggle { display: none; }

/* Dropdown menu and submenu styles */
.menu-content {
  display: none;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  position: absolute;
  right: 60px;
  bottom: 0;
  transform: none;
  width: 200px;
  z-index: 10020;
}

.menu-toggle:checked ~ .menu-content {
  display: block;
}

.menu-content h3 {
  margin-top: 0;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #ddd;
  color: #1a5f7a;
}

.menu-content a {
  color: #333;
  text-decoration: none;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  transition: background-color 0.3s;
  border-radius: 4px;
}

.menu-content a:hover {
  background-color: #f8f9fa;
}

.menu-content a i {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.7em;
}

/* Submenu styles */
.submenu {
  margin-bottom: 5px;
}

.submenu-toggle {
  background-color: #f8f9fa;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.submenu-toggle:hover {
  background-color: #e9ecef;
}

.submenu-toggle i.fa-chevron-down,
.submenu-toggle i.fa-chevron-up {
  margin-left: auto;
}

.submenu-content {
  display: none;
  padding-left: 15px;
  margin-top: 5px;
  background-color: #f1f3f5;
  border-radius: 4px;
}

.submenu-content a {
  padding: 6px 8px;
}

.submenu-content a:hover {
  background-color: #e9ecef;
}

/* Adjust padding for deeply nested items */
.submenu-content .submenu-content {
  padding-left: 10px;
}

/* Ensure proper spacing for icons in deeply nested items */
.submenu-content .submenu-content a i {
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.7em;
}

/* Remove all other unnecessary rules */