body {
  font-family: sans-serif;
  background: #faf6e9;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

header {
  margin: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 2;
}

#searchBar {
  padding: 15px;
  width: 400px;
  font-size: 18px;
  border-radius: 25px;
  border: 2px solid #ddd;
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#familyTree {
  position: relative;
  width: 100%;
  height: 600px;
  max-width: 1200px;
  background: #fffaf0;
  border: 1px solid #eee;
  border-radius: 10px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 20px;
}

.node {
  cursor: pointer;
}

.link {
  fill: none;
  stroke: #ccc;
  stroke-width: 1.5px;
}

.family-icon {
  border-radius: 50%;
  transition: transform 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.family-icon:hover {
  transform: scale(1.1);
  z-index: 1;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Mobile-friendly styles */
@media (max-width: 768px) {
  #searchBar {
    width: 80%;
    max-width: 300px;
  }

  #familyTree {
    height: auto;
    min-height: 600px;
    margin-top: 0;
    padding: 20px;
  }

  .mobile-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 30px;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    justify-items: center;
    align-items: center;
  }

  .person-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    height: 100px;
  }

  .mobile-list .family-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0;
    display: block;
  }

  .mobile-list .family-icon:hover {
    transform: scale(1.1);
  }

  /* Hide tree elements on mobile */
  .link, .node {
    display: none;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  .mobile-list {
    display: none;
  }
}
