.module-launcher {
  position: relative;
  min-width: 248px;
  z-index: 120;
}

.brand-module-launcher {
  min-width: 0;
  width: 100%;
}

.module-launcher-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, rgba(162, 15, 159, 0.98), rgba(95, 54, 215, 0.98));
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  text-align: left;
}

.module-launcher-button span {
  grid-column: 1;
  grid-row: 1;
  display: block;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-launcher-button strong {
  grid-column: 1;
  grid-row: 2;
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
  line-height: 1.15;
}

.module-launcher-button i {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-style: normal;
}

.module-launcher.open .module-launcher-button i {
  transform: rotate(180deg);
}

.module-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10000;
  width: min(980px, calc(100vw - 40px));
  max-height: calc(100vh - 56px);
  overflow: auto;
  display: none;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: #120d1c;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  transform: translate(-50%, -50%);
}

.module-menu.open {
  display: block;
}

.module-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  background: rgba(8, 5, 13, 0.78);
  backdrop-filter: blur(10px);
}

.module-menu-backdrop.open {
  display: block;
}

body.module-menu-open {
  overflow: hidden;
}

.module-menu-head {
  position: sticky;
  top: -16px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px) auto;
  gap: 14px;
  align-items: end;
  padding: 16px 4px 14px;
  margin: -16px -4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: #120d1c;
}

.module-menu-head span {
  display: block;
  color: #22c2e8;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-menu-head strong {
  display: block;
  margin-top: 4px;
  color: #f8f4ff;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.05;
}

.module-menu-head p {
  margin: 8px 0 0;
  color: #c9bfd9;
  line-height: 1.45;
}

.module-search {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #f8f4ff;
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.module-menu-close {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  font-weight: 950;
  cursor: pointer;
}

.module-group {
  padding: 14px 4px 2px;
}

.module-group-title {
  padding: 8px 8px 10px;
  color: #22c2e8;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.module-menu-item {
  display: block;
  min-height: 86px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #f8f4ff;
  background: rgba(255, 255, 255, 0.045);
  text-decoration: none;
  text-align: left;
}

.module-menu-item:hover,
.module-menu-item.active {
  border-color: rgba(34, 194, 232, 0.7);
  background: linear-gradient(135deg, rgba(162, 15, 159, 0.22), rgba(34, 194, 232, 0.1));
}

.module-menu-item.disabled {
  cursor: default;
  opacity: 0.52;
}

.module-menu-item small,
.module-menu-item span {
  display: block;
}

.module-menu-item small {
  color: #22c2e8;
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.module-menu-item strong {
  display: block;
  margin: 4px 0;
  font-size: 0.88rem;
  line-height: 1.18;
}

.module-menu-item span {
  color: #c9bfd9;
  font-size: 0.72rem;
  font-weight: 800;
}

.module-menu-item.hidden {
  display: none;
}

.module-status-live {
  color: #1cc98a;
}

.module-status-soon {
  color: #8e819d;
}

body[data-theme="light"] .module-menu {
  border-color: rgba(35, 24, 48, 0.12);
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(31, 23, 45, 0.16);
}

body[data-theme="light"] .module-menu-backdrop {
  background: rgba(20, 16, 28, 0.46);
}

body[data-theme="light"] .module-menu-head {
  background: #ffffff;
  border-bottom-color: rgba(35, 24, 48, 0.12);
}

body[data-theme="light"] .module-menu-head strong {
  color: #15111e;
}

body[data-theme="light"] .module-menu-head p {
  color: #5f5870;
}

body[data-theme="light"] .module-search {
  color: #15111e;
  border-color: rgba(35, 24, 48, 0.12);
  background: rgba(240, 237, 247, 0.82);
}

body[data-theme="light"] .module-menu-close {
  color: #15111e;
  border-color: rgba(35, 24, 48, 0.12);
  background: rgba(240, 237, 247, 0.82);
}

body[data-theme="light"] .module-menu-item {
  color: #15111e;
  border-color: rgba(35, 24, 48, 0.1);
  background: rgba(240, 237, 247, 0.74);
}

body[data-theme="light"] .module-menu-item span {
  color: #5f5870;
}

@media (max-width: 620px) {
  .module-launcher {
    min-width: 0;
    width: 100%;
  }

  .module-menu {
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: none;
    transform: none;
  }

  .module-menu-grid {
    grid-template-columns: 1fr;
  }

  .module-menu-head {
    grid-template-columns: 1fr;
  }

  .module-menu-head > div {
    padding-right: 48px;
  }

  .module-menu-close {
    position: absolute;
    top: 14px;
    right: 14px;
  }
}
