button,
input,
select,
textarea {
  font-family: inherit;
}

.nav-buttons {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 16px;
  margin: 0 auto;
  padding: 16px 28px;
  max-width: 1200px;
  position: sticky;
  margin-top: 64px;
  margin-bottom: 128px;
  top: 0;
  background: var(--bg-color);
  cursor: pointer;
}

@media screen and (max-width: 768px) {
  .nav-buttons {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 8px;
    padding: 8px;
  }
}

.nav-button {
  margin: 0;
  padding: 20px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  border: 2px solid var(--text-color);
  background: var(--bg-color);
  color: var(--text-color);
  min-width: 125px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nav-button:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.nav-button span {
  font-size: 2.2vw;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
}

@media screen and (max-width: 768px) {
  .nav-buttons {
    gap: 10px;
    padding: 10px;
    flex-wrap: nowrap;
  }

  .nav-button {
    padding: 10px 90px;
  }
}

@media screen and (max-width: 480px) {
  .nav-button {
    width: 50%;
  }
}

.nav-buttons-2 {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  text-align: center;
  align-items: flex-start;
  gap: 8px;
  margin: 32px auto 64px auto;
  padding: 16px 20px;
  width: 100%;
  max-width: 100%;
  background: var(--bg-color);
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-button-2 {
  margin: 8px auto;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  border: 2px solid var(--text-color);
  background: var(--bg-color);
  color: var(--text-color);
  min-width: 160px;
  max-width: 190px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.buttons-3 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto repeat(14, auto);
  grid-auto-flow: column;
  gap: 8px;
  align-items: start;
  justify-items: stretch;
}

.buttons-3 > .nav-button-2 {
  margin: 8px auto;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 25px;
  border: 2px solid var(--text-color);
  background: var(--bg-color);
  color: var(--text-color);
  min-width: 200px;
  max-width: 200px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.buttons-3 .category-title {
  grid-column: span 2;
}

.buttons-3 .nav-button-2 {
  width: 100% !important;
  margin: 0;
}

.category-title {
  font-size: 1.5em;
  font-weight: bold;
  text-decoration: underline;
  text-align: center;
}

#floatingNavWrapper {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4000;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

#floatingEllipse {
  width: 4vw;
  height: 16px;
  opacity: 80%;
  margin-top: 4px;
  border: none;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  display: block;
  position: relative;
  transition:
    box-shadow 0.2s,
    transform 0.4s cubic-bezier(0.4, 1.6, 0.4, 1);
}

#floatingEllipse::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  border: 2px solid var(--text-color);
  border-radius: 12px;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  box-sizing: border-box;
}

#floatingNavWrapper.open #floatingEllipse {
  transform: translateY(56px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

#floatingNavButtons {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-32px);
  transition:
    opacity 0.4s cubic-bezier(0.4, 1.6, 0.4, 1),
    transform 0.4s cubic-bezier(0.4, 1.6, 0.4, 1);
  display: flex;
  flex-direction: row;
  gap: 16px;
  background: var(--bg-color);
  border: 2px solid var(--text-color);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  padding: 10px 10px;
  margin-top: -2px;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  overflow-x: auto;
  box-sizing: border-box;
}

#floatingNavWrapper.open #floatingNavButtons {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@media screen and (max-width: 768px) {
  #floatingNavButtons {
    flex-direction: column;
  }

  #floatingNavButtons .nav-button span {
    font-size: 6vw;
    white-space: nowrap;
    text-align: center;
    font-weight: 500;
  }
}
