#header {
  min-width: 576px;
  width: 100%;
  height: 4rem;
  /* background-color: #c4c3bf !important; */
  /* border-bottom: 1px solid var(--navy-dark); */
}

#header-content {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.row {
  margin-right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#left-part {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 !important;
  flex: 1;
}

#right-part {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0 !important;
  flex: 1;
}

.div-title {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  flex-wrap: nowrap;
}

.div-title .logo-link {
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.div-title .logo-link:hover {
  opacity: 0.8;
}

.div-title .logo-svg {
  height: 2.5rem;
  width: auto;
  max-width: 200px;
}

.beta-tag {
  background-color: rgba(50, 205, 50, 0.4);
  color: #000000;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-left: 0.5rem;
  text-align: center;
  line-height: 1;
  font-family: 'Helvetica', 'Arial', sans-serif;
}

.div-title h3 {
  font-size: calc(2rem * 0.9) !important;
}

@media (max-width: 992px) {
  .div-title {
    justify-content: center;
  }

  .div-title .logo-svg {
    height: 2rem;
    max-width: 150px;
  }

  .beta-tag {
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
  }
}

@media (max-width: 768px) {
  .div-title {
    justify-content: center;
  }

  .div-title .logo-svg {
    height: 2.2rem;
    max-width: 140px;
  }

  .beta-tag {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    margin-left: 0.4rem;
  }
}

@media (max-width: 480px) {
  #right-part {
    justify-content: flex-end;
  }

  .div-title {
    justify-content: center;
  }

  .div-title .logo-svg {
    height: 2rem;
    max-width: 130px;
  }

  .beta-tag {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
    margin-left: 0.35rem;
  }
}

/* Extra small mobile screens */
@media (max-width: 360px) {
  #right-part {
    justify-content: flex-end;
  }

  .div-title {
    justify-content: center;
  }

  .div-title .logo-svg {
    height: 1.8rem;
    max-width: 120px;
  }

  .beta-tag {
    font-size: 0.55rem;
    padding: 0.12rem 0.3rem;
    margin-left: 0.3rem;
  }
}

/* Ultra small screens */
@media (max-width: 320px) {
  #right-part {
    justify-content: flex-end;
  }

  .div-title {
    justify-content: center;
  }

  .div-title .logo-svg {
    height: 1.6rem;
    max-width: 110px;
  }

  .beta-tag {
    font-size: 0.5rem;
    padding: 0.1rem 0.25rem;
    margin-left: 0.25rem;
  }
}

.title {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.title:hover {
  color: var(--navy-lightest);
  text-decoration: none;
}

#right-part .item {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 0;
}

#profile-button,
#documentation-button,
#swapnet-button {
  font-size: calc(1rem * 0.9) !important;
  color: #000000;
  text-decoration: none;
  transition: color 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

#profile-button:hover,
#documentation-button:hover,
#swapnet-button:hover {
  color: #000000;
  text-decoration: none;
  background-color: rgba(0, 0, 0, 0.1);
}

#connectButton {
  font-size: calc(1rem * 0.9);
  background-color: #dbff00;
  color: #000000;
  border: 2px solid #dbff00;
  border-radius: 4px;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

#connectButton:hover {
  background-color: #c7e600;
  border-color: #c7e600;
  color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(219, 255, 0, 0.3);
}

/* Shadcn-style Mobile navigation styles */
.shadcn-mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: transparent;
  border: 1px solid hsl(214.3 31.8% 91.4%);
  color: hsl(222.2 84% 4.9%);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  outline: none;
  position: relative;
  margin-left: auto;
}

.shadcn-mobile-menu-btn:hover {
  background-color: hsl(210 40% 98%);
  border-color: hsl(214.3 31.8% 91.4%);
}

.shadcn-mobile-menu-btn:focus {
  outline: 2px solid hsl(222.2 84% 4.9%);
  outline-offset: 2px;
}

.shadcn-mobile-menu-btn[aria-expanded="true"] {
  background-color: hsl(210 40% 98%);
  border-color: hsl(214.3 31.8% 91.4%);
}

.shadcn-menu-icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

#header {
  position: relative;
}

/* Shadcn-style mobile navigation menu */
.shadcn-mobile-nav-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: hsl(0 0% 100%);
  border: 1px solid hsl(214.3 31.8% 91.4%);
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 50;
  margin-top: 8px;
  padding: 8px;
  min-width: 280px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.shadcn-mobile-nav-menu.show {
  display: block !important;
  opacity: 1;
  transform: translateY(0);
}

.shadcn-mobile-nav-menu.collapsing {
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.shadcn-mobile-nav-content {
  width: 100%;
}

.shadcn-mobile-nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shadcn-mobile-nav-item {
  position: relative;
}

.shadcn-mobile-nav-link {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  outline: none;
  border: none;
  background: transparent;
}

.shadcn-mobile-nav-link:hover {
  background-color: hsl(210 40% 98%);
  color: hsl(222.2 84% 4.9%);
}

.shadcn-mobile-nav-link:focus {
  outline: 2px solid hsl(222.2 84% 4.9%);
  outline-offset: 2px;
}

.shadcn-nav-link-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shadcn-nav-link-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  color: hsl(222.2 84% 4.9%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.shadcn-nav-link-description {
  font-size: 12px;
  line-height: 1.4;
  color: hsl(215.4 16.3% 46.9%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Responsive adjustments for Shadcn mobile navigation */
@media (max-width: 480px) {
  .shadcn-mobile-nav-menu {
    margin-left: 8px;
    margin-right: 8px;
    min-width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
  }

  .shadcn-mobile-nav-link {
    padding: 14px 16px;
  }

  .shadcn-nav-link-title {
    font-size: 15px;
  }

  .shadcn-nav-link-description {
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .shadcn-mobile-nav-menu {
    margin-left: 4px;
    margin-right: 4px;
    min-width: calc(100vw - 8px);
    max-width: calc(100vw - 8px);
  }

  .shadcn-mobile-nav-link {
    padding: 12px 14px;
  }
}

/* Ensure Shadcn mobile menu is hidden by default */
@media (max-width: 767.98px) {
  .shadcn-mobile-nav-menu:not(.show) {
    display: none !important;
  }
}

/* Ensure proper stacking context */
#header {
  z-index: 1030;
}

.shadcn-mobile-nav-menu {
  z-index: 1031;
}

/* Enhanced mobile responsiveness */
@media (max-width: 576px) {
  #header {
    min-width: 100%;
    padding: 0 0.5rem;
  }

  #left-part {
    justify-content: center;
  }

  #right-part {
    justify-content: flex-end;
  }

  .div-title {
    justify-content: center;
  }

  .div-title .logo-svg {
    height: 1.8rem;
    max-width: 120px;
  }

  .beta-tag {
    font-size: 0.55rem;
    padding: 0.12rem 0.3rem;
    margin-left: 0.3rem;
  }

  #connectButton {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
  }

  .shadcn-mobile-menu-btn {
    width: 36px;
    height: 36px;
  }

  .shadcn-menu-icon {
    width: 18px;
    height: 18px;
  }
}

/* iPhone 16 specific optimizations */
@media (max-width: 430px) and (min-height: 900px) {
  #header {
    height: 4.5rem;
    padding-top: env(safe-area-inset-top);
  }

  #header-content {
    padding-top: 0.5rem;
  }

  .mobile-nav-menu {
    margin-top: env(safe-area-inset-top);
  }
}