body {
  background-color: black;
  color: white;
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

header,
main,
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

header img {
    width: 48px;
    height: 48px;
}

#search {
  width: 100%;
  padding: 10px;
  background-color: #333;
  color: white;
  border: none;
  margin-bottom: 20px;
  box-sizing: border-box;
}

#content-wrapper {
  display: flex;
  gap: 2rem;
  margin: 0 auto;
}

#webring {
  flex: 1;
}

#webring-chart {
  flex: 1;
}

#webring-list {
  border: 1px solid white;
  list-style-type: none;
  padding: 0;
  margin: 0;
  height: 600px;
  overflow-y: auto;
}

#webring-list li {
  padding: 5px 10px;
}

#webring-list a {
  color: #ffffff;
  text-decoration: none;
}

#webring-list a:hover {
  text-decoration: underline;
}

#chart-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000;
    border: 1px solid #fff;
    height: 600px;
}

#chart-container svg {
    max-width: 100%;
    height: auto;
}

.tooltip {
    position: absolute;
    text-align: center;
    padding: 8px;
    font: 12px sans-serif;
    background: #fff;
    color: #000;
    border: 0px;
    border-radius: 8px;
    pointer-events: none;
}

#add-site {
    color: #bd082c;
}

footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
}

footer a {
    color: #fff;
}

/* Add media query for mobile devices */
@media screen and (max-width: 768px) {
    header,
    main,
    footer {
        padding: 0 1rem;  /* Back to 1rem side padding */
    }

    header {
        padding: 0.5rem 1rem;  /* Increased padding */
    }
    
    header img {
        width: 40px;
        height: 40px;
    }

    #search {
        padding: 8px;
        margin-bottom: 12px;  /* Slightly increased margin */
    }

    #content-wrapper {
        flex-direction: column;
        gap: 1rem;
        height: calc(90vh - 160px);
    }

    #webring, #webring-chart {
        width: 100%;
        height: calc(42% - 0.5rem);
    }

    #chart-container {
        width: 100%;
        max-width: 100%;
        height: 100%;
    }

    #webring-list {
        height: 100%;
    }

    footer {
        margin-top: 8px;
        padding: 0.5rem 1rem;  /* Increased padding */
    }
}
