@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
:root{
  --nav-height: 74px;
  --nav-padding: 0 32px;
}

.app-navbar{
  height: var(--nav-height);
  padding: var(--nav-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  background: rgba(5,5,5,0.92);
  position: relative;
  z-index: 20;
}

/* Centered nav links container (places Problems/Contests in middle) */
.nav-center{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 18px;
  align-items: center;
}
.nav-center a{
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.app-navbar .brand{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  text-decoration: none;
}

.brand-icon{
  width: 30px;
  height: 30px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-text{
  line-height: 1;
}

.app-navbar .nav-links{
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-navbar .nav-links a{
  color: #cbd5e1;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}

.nav-auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-login-btn,
.nav-signup-btn {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  text-decoration: none;
  display: inline-block;
}

.nav-login-btn {
  background: rgba(255,255,255,0.08);
  color: #f8fafc;
  border: 1px solid rgba(255,255,255,0.12);
}

.nav-login-btn:hover {
  background: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.nav-signup-btn {
  background: #ffffff;
  color: #050505;
  border: none;
}

.nav-signup-btn:hover {
  background: #e2e8f0;
  transform: translateY(-1px);
}

.profile-menu{
  position: relative;
}

.profile-trigger{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  font: inherit;
}

.profile-avatar{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  color: #050505;
  background: linear-gradient(135deg, #93c5fd, #ffffff);
  overflow: hidden;
}

.profile-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name{
  font-size: 14px;
  font-weight: 700;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-caret{
  color: #94a3b8;
  font-size: 12px;
}

.profile-dropdown{
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  background: #111827;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.profile-dropdown.open{
  display: block;
}

.profile-dropdown a,
.profile-dropdown button{
  width: 100%;
  display: block;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  color: #e2e8f0;
  background: transparent;
  text-align: left;
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.profile-dropdown a:hover,
.profile-dropdown button:hover{
  background: rgba(255,255,255,0.06);
}

@media (max-width: 640px){
  .app-navbar{
    padding: 0 16px;
  }

  .profile-name{
    display: none;
  }
  .brand-icon{
    width: 48px;
    height: 48px;
  }
  .brand-text{
    margin-top: 1px;
    font-size: 18px;
  }
}
