@use '../../../styles/variables' as *;

.navContainer {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  pointer-events: auto;
}

.navList {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

.navItem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.15s ease;

  &:hover {
    background: rgba(0, 0, 0, 0.06);
    transform: scale(1.08);
  }

  &:active {
    transform: scale(0.95);
  }
}

.icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.active {
  background: rgba(59, 130, 246, 0.15);
  box-shadow: inset 0 0 0 2px var(--primary-color);
}

// 暗色主题适配
:global([data-theme='dark']) {
  .navList {
    background: rgba(30, 30, 30, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  }

  .navItem {
    &:hover {
      background: rgba(255, 255, 255, 0.1);
    }
  }

  .active {
    background: rgba(59, 130, 246, 0.25);
  }
}

// 小屏幕改为底部横向浮层
@media (max-width: 1200px) {
  .navContainer {
    top: auto;
    right: auto;
    left: 50%;
    bottom: calc(12px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: min(520px, calc(100vw - 24px));
  }

  .navList {
    flex-direction: row;
    gap: 6px;
    padding: 8px 10px;
    border-radius: 999px;
    overflow-x: auto;
    scrollbar-width: none;

    &::-webkit-scrollbar {
      display: none;
    }
  }

  .navItem {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    flex: 0 0 auto;
  }

  .icon {
    width: 22px;
    height: 22px;
  }
}
