/* Desktop hover sidebar + mobile hub links — load after style.css */

.pu-sidebar-dock {
  position: fixed;
  left: 0;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: 18px;
  max-height: min(68vh, 520px);
  z-index: 70;
  display: flex;
  align-items: stretch;
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.pu-sidebar-dock:hover,
.pu-sidebar-dock:focus-within {
  width: min(204px, 82vw);
}

.pu-sidebar-tab {
  flex: 0 0 18px;
  width: 18px;
  min-height: 120px;
  border-radius: 0 10px 10px 0;
  border: 1px solid rgba(141, 75, 255, 0.45);
  border-left: none;
  background: linear-gradient(180deg, rgba(141, 75, 255, 0.22), rgba(0, 245, 255, 0.08));
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  cursor: default;
}

.pu-sidebar-chevron {
  font-family: Orbitron, sans-serif;
  font-size: 0.95rem;
  color: var(--cyan, #00f5ff);
  text-shadow: 0 0 8px rgba(0, 245, 255, 0.45);
  animation: puChevronPulse 2.2s ease-in-out infinite;
}

@keyframes puChevronPulse {
  0%,
  100% {
    opacity: 0.65;
    transform: translateX(0);
  }
  50% {
    opacity: 1;
    transform: translateX(2px);
  }
}

.pu-sidebar-panel {
  flex: 1;
  min-width: 0;
  min-height: 0;
  margin-left: 6px;
  padding: 10px 10px 12px;
  border-radius: 0 12px 12px 0;
  max-height: min(68vh, 520px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid rgba(141, 75, 255, 0.38);
  background: rgba(8, 8, 14, 0.82);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow:
    0 0 0 1px rgba(0, 245, 255, 0.06),
    8px 0 40px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(141, 75, 255, 0.12);
  opacity: 0;
  transform: translateX(-8px);
  filter: blur(4px);
  pointer-events: none;
  transition:
    opacity 0.3s ease,
    transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.3s ease,
    box-shadow 0.3s ease;
}

.pu-sidebar-dock:hover .pu-sidebar-panel,
.pu-sidebar-dock:focus-within .pu-sidebar-panel {
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
  pointer-events: auto;
  box-shadow:
    0 0 0 1px rgba(0, 245, 255, 0.12),
    12px 0 48px rgba(0, 0, 0, 0.5),
    0 0 32px rgba(0, 245, 255, 0.14);
}

.pu-sidebar-label {
  margin: 0 0 10px;
  font-family: Orbitron, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9ea6c9;
}

.pu-side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-main, #f6f8ff);
  font-family: Orbitron, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(141, 75, 255, 0.22);
  background: rgba(141, 75, 255, 0.08);
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease;
}

.pu-side-link:hover,
.pu-side-link:focus-visible {
  border-color: rgba(0, 245, 255, 0.55);
  background: rgba(0, 245, 255, 0.1);
  box-shadow: 0 0 18px rgba(0, 245, 255, 0.2);
  transform: translateX(2px);
  outline: none;
}

.pu-side-link[aria-current="page"] {
  border-color: rgba(0, 245, 255, 0.65);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.18);
}

.pu-side-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  line-height: 1;
  border-radius: 6px;
  background: rgba(0, 245, 255, 0.08);
  border: 1px solid rgba(0, 245, 255, 0.25);
  flex-shrink: 0;
}

/* Mobile: hub links inside top nav dropdown */
.pu-hub-block {
  display: none;
}

.pu-hub-block-title {
  margin: 0 0 8px;
  font-family: Orbitron, sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8b95b8;
}

.pu-hub-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  min-height: 44px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-main, #f6f8ff);
  font-family: Orbitron, sans-serif;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(141, 75, 255, 0.28);
  background: rgba(141, 75, 255, 0.1);
  transition: all 0.22s ease;
}

.pu-hub-link:hover,
.pu-hub-link:focus-visible {
  border-color: rgba(0, 245, 255, 0.55);
  box-shadow: 0 0 14px rgba(0, 245, 255, 0.18);
  outline: none;
}

.pu-hub-link[aria-current="page"] {
  border-color: rgba(0, 245, 255, 0.6);
}

.pu-hub-link .pu-side-icon {
  width: 30px;
  height: 30px;
  font-size: 0.95rem;
}

@media (max-width: 980px) {
  .pu-sidebar-dock {
    display: none !important;
  }

  .pu-hub-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    padding-bottom: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(141, 75, 255, 0.28);
  }

  .nav-links.open {
    width: min(100%, 100vw - 24px);
    max-width: none;
    left: 12px;
    right: 12px;
    max-height: min(88vh, 720px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .main-nav {
    position: relative;
  }
}

@media (min-width: 981px) {
  .pu-hub-block {
    display: none !important;
  }
}
