/* Reset and basics */
* {
  box-sizing: border-box;
}
body, html {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: #000000;
  min-height: 100vh;
}


.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

/* Navbar */
.navbar {
  background: #2f2f2f; /* dark grey */
  color: #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Left */
.navbar-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: #f5f5f5;
  text-decoration: none;
  user-select: none;
}

/* Center */
.navbar-center {
  display: none; /* Hidden on desktop */
  align-items: center;
}

/* Desktop Nav Links */
.nav-links {
  list-style: none;
  margin: 0; 
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

.nav-links li {
  display: inline-block;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: #b0b0b0;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.4rem 0.3rem;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.nav-link .nav-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.nav-link:hover,
.nav-link:focus {
  color: #fff;
  border-color: #a0a0a0;
  outline: none;
}

.nav-link.active {
  color: #fff;
  border-color: #c0c0c0;
  font-weight: 700;
}

/* Right */
.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Buttons */
.btn {
  background: transparent;
  border: 1.5px solid #a0a0a0;
  padding: 0.3rem 0.8rem;
  color: #a0a0a0;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn:hover,
.btn:focus {
  background-color: #a0a0a0;
  color: #2f2f2f;
  outline: none;
}

.login-btn {
  border-color: #a0a0a0;
  color: #a0a0a0;
}

.register-btn {
  border-color: #c0c0c0;
  color: #c0c0c0;
}

.register-btn:hover,
.register-btn:focus {
  background-color: #c0c0c0;
  color: #2f2f2f;
}

/* Search */
.search-btn {
  background: transparent;
  border: none;
  color: #c0c0c0;
  font-size: 1.2rem;
  padding: 0.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.search-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

/* Profile Dropdown */
.profile-dropdown {
  position: relative;
}

.profile-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #a0a0a0;
  transition: border-color 0.25s ease;
}

.profile-btn:hover .avatar,
.profile-btn:focus .avatar {
  border-color: #c0c0c0;
  outline: none;
}

.profile-menu {
  position: absolute;
  right: 0;
  top: 48px;
  background: #3a3a3a;
  border-radius: 6px;
  min-width: 180px;
  padding: 0.8rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  color: #ddd;
  display: flex;
  flex-direction: column;
  z-index: 2000;
}

.profile-menu a,
.profile-menu button {
  color: #ddd;
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  font-size: 0.9rem;
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.profile-menu a:hover,
.profile-menu button:hover,
.profile-menu a:focus,
.profile-menu button:focus {
  background-color: #5a5a5a;
  outline: none;
}

.profile-info {
  border-bottom: 1px solid #555;
  padding: 0 1.2rem 0.6rem;
  font-size: 0.85rem;
}

.wallet-balance {
  margin-top: 0.3rem;
  font-weight: 600;
  color: #b0b0b0;
}

/* Logout button */
.logout-btn {
  width: 100%;
  text-align: left;
  color: #ff5e5e;
  font-weight: 600;
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(47,47,47,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 3000;
}

.search-container {
  background: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.search-input {
  flex-grow: 1;
  font-size: 1.1rem;
  padding: 0.5rem 0.7rem;
  border: 1.5px solid #666;
  border-radius: 4px;
  outline-offset: 2px;
  outline-color: #999;
}

.search-input:focus {
  border-color: #999;
  box-shadow: 0 0 5px #999;
}

.search-close-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #bbb;
  display: flex;
  align-items: center;
  padding: 0.1rem;
}

.close-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

/* Hamburger Button */
.hamburger-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #c0c0c0;
  padding: 0.5rem;
  display: none; /* Hidden on desktop */
}

.hamburger-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

.hamburger-btn:hover,
.hamburger-btn:focus {
  color: #fff;
  outline: none;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 60px;
  right: 0;
  width: 75%;
  max-width: 300px;
  height: calc(100% - 60px);
  background: #3a3a3a;
  z-index: 2000;
  overflow-y: auto;
  box-shadow: -4px 0 12px rgba(0,0,0,0.2);
}

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  color: #ddd;
  text-decoration: none;
  font-size: 1rem;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus,
.mobile-nav-link.active {
  background-color: #5a5a5a;
  color: #fff;
  outline: none;
}

.mobile-nav-link .nav-icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.mobile-nav-link.logout-btn {
  color: #ff5e5e;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.mobile-profile-info {
  padding: 1rem;
  border-bottom: 1px solid #555;
  color: #ddd;
  font-size: 0.9rem;
}

.mobile-profile-info .wallet-balance {
  margin-top: 0.3rem;
  font-weight: 600;
  color: #b0b0b0;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    flex-wrap: nowrap;
    height: auto;
    padding: 0.5rem 1rem;
    justify-content: space-between;
    align-items: center;
  }

  .navbar-left {
    flex: 0 0 auto;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 0;
  }

  .navbar-center {
    display: flex; /* Show search button in middle */
    flex: 1;
    justify-content: center;
    align-items: center;
  }

  .hamburger-btn {
    display: flex; /* Show hamburger on mobile */
  }

  .desktop-nav {
    display: none; /* Hide desktop nav links */
  }

  .navbar-right {
    flex: 0 0 auto;
    gap: 0.7rem;
    justify-content: flex-end;
  }

  .auth-container {
    display: none; /* Hide profile/login buttons on mobile */
  }

  .profile-menu {
    top: 48px;
    right: -10px;
  }
}

