body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background: #0d1b2a;
  color: #ffffff;
}
header {
  background: #1b263b;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
}
nav ul li a {
  color: white;
  text-decoration: none;
}
#menuToggle {
  display: none;
}
main {
  padding: 1rem;
}

.active a {
  color: #4FC3F7;
  font-weight: bold;
}
.preview {
  display: grid;
  grid-template-columns: 20% 80%;
}

.preview-form {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: rgba(20, 20, 30, 0.8);
  border-radius: 10px;
  color: #fff;
}

.preview-form label {
  margin-bottom: 0.5rem;
  font-weight: bold;
}
.preview-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: rgba(20, 20, 30, 0.8);
  border-radius: 10px;
}

.parent-container {
      margin: 1em 0;
    }
    .toggle-button {
      cursor: pointer;
      font-weight: bold;
      margin-right: 6px;
    }
    .children {
      margin-left: 20px;
      display: none;
    }
    .children.visible {
      display: block;
    }

#planetContainer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.planet-card {
  position: relative;
  background: #415a77;
  margin: 1rem 0;
  padding: 0rem;
  border-radius: 10px;
  max-width: 550px;
  cursor: pointer;


  
}


.planet-img {
  width: 100%;
  aspect-ratio: 2 / 1.25;
  object-fit: cover;
  border-radius: 0px;
  display: block;


   
  
}





.tooltip {
      position: absolute;
      background: rgba(130, 30, 50, 0.95);
      padding: 10px;
      border-radius: 10px;
      z-index: 100;
      width: 500px;
      
      
      
      
      
      
    }

    .tooltip img {
      width: 100%;
      aspect-ratio: 2 / 1.25;
      border-radius: 6px;
      margin-bottom: 8px;
      object-fit: cover;
      display: block;
      
    }

    .tooltip p {
      margin: 0;
      font-size: 0.9rem;
      line-height: 1.3;
    }

    .tooltip a {
      display: inline-block;
      margin-top: 6px;
      color: #7bcfff;
      font-size: 0.85rem;
      text-decoration: underline;
    }

    .tooltip::after {
      content: "";
      position: absolute;
      border: 8px solid transparent;
    }

    .tooltip.top::after {
      bottom: -16px;
      left: 50%;
      transform: translateX(-50%);
      border-top-color: rgba(130, 30, 50, 0.95);
    }

    .tooltip.left::after {
      right: -16px;
      top: 50%;
      transform: translateY(-50%);
      border-left-color: rgba(130, 30, 50, 0.95);
    }

    .tooltip.right::after {
      left: -16px;
      top: 50%;
      transform: translateY(-50%);
      border-right-color: rgba(130, 30, 50, 0.95);
    }
    .tooltip.bottom::after {
      top: -16px;
      left: 50%;
      transform: translateX(-50%);
      border-bottom-color: rgba(130, 30, 50, 0.95);
    }

     .toggle-btn {
      position: absolute;
      top: 20px;
      left: 20px;
      background: rgba(110,0,0,0.7);
      border: none;
      color: white;
      padding: 6px 12px;
      border-radius: 20px;
      cursor: pointer;
      z-index: 3;
      transition: background 0.3s;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .toggle-btn:hover {
      background: rgba(0,0,110,0.9);
    }

    .toggle-btn svg {
      width: 14px;
      height: 14px;
      fill: white;
    }


    .dropdown {
      position: absolute;
      
      top: 10;
      left: 10;
      width: 100%;
      max-height: 0;
      
      background: rgba(20, 20, 30, 0.92);
      color: #fff;
      transition: max-height 0.5s ease, padding 0.3s ease, opacity 0.3s ease;
      opacity: 0;
      z-index: 2;
      padding: 0 16px;
    }

    .flex-list {
  column-count: 2;
  column-gap: 20px;
  
  padding: 5px;
}



    .dropdown.open {
      max-height: 300px;
      max-width: 468px;
      padding: 10px;
      border-radius: 10px;
      
      padding: 16px;
      opacity: 1;
    }

    .more-btn {
      margin-top: 10px;
      color: #00c3ff;
      cursor: pointer;
      font-weight: bold;
      -webkit-user-select: none;
      user-select: none;
      transition: opacity 0.3s ease;
    }

    .more-info {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.4s ease;
      font-size: 14px;
      color: #ddd;
      padding-top: 6px;
    }

    .more-info.open {
      max-height: 100px;
    }

     #pagination {
      margin-top: 20px;
      text-align: center;
    }
    #pagination button {
      padding: 6px 12px;
      margin: 0 5px;
    }

    #prevBtn1, #nextBtn1 {
inline-size: inherit;
background: #1b263b;
color: #fff;
border: none;
border-radius: 6px;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
transition: background 0.2s, color 0.2s;
}

#prevBtn1:hover, #nextBtn1:hover {
  background: #415a77;
  color: #7bcfff;
}

.preview-form button[type="submit"] {
  background: #7bcfff;
  color: #1b263b;
  border: none;
  padding: 0.7em 1.5em;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  margin-top: 1em;
  transition: background 0.2s, color 0.2s;
}

.preview-form button[type="submit"]:hover {
  background: #1b263b;
  color: #7bcfff;
}







@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  nav ul {
    flex-direction: column;
    display: none;
  }
  nav ul.show {
    display: flex;
  }
  #menuToggle {
    display: block;
    background: none;
    color: white;
    border: none;
    font-size: 1.5rem;
  }
}




@media (max-width: 640px) {

  *, *::before, *::after {
  box-sizing: border-box;
}
  nav ul {
    flex-direction: column;
    display: none;
  }
  nav ul.show {
    display: flex;
  }
  #menuToggle {
    display: block;
    background: none;
    color: white;
    border: none;
    font-size: 2rem;
  }

  body {
    display: flex;
    flex-direction: column;
    padding: 0.5rem;
  }
  .form-container {
    width: 100%;
    max-width: 100%;
    padding: 0.5rem;
    background: rgba(20, 20, 30, 0.8);
    border-radius: 10px;
    margin-bottom: 1rem;
  }

  .preview {
    grid-template-columns: 1fr;
  }
  .planet-card {
    max-width: 100%;
  }
  .planet-img {
    aspect-ratio: 1 / 1;
  }
  .tooltip {
    width: 90%;
    max-width: none;
  }

   

    
  .dropdown {
    width: 100%;
    max-width: none;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    padding: 10px;
    
  }
  .dropdown.open {
    max-height: 200px;
    padding: 10px;
    background: rgba(20, 20, 30, 10);
  }
  .toggle-btn {
    top: 10px;
    left: 10px;
  }
  .toggle-btn svg {
    width: 16px;
    height: 16px;
  }
  .more-info {
    max-height: 150px;
  }
  .preview-form {
    padding: 0.5rem;
  }
  .preview-form label {
    margin-bottom: 0.25rem;
  }
  .preview-form button[type="submit"] {
    padding: 0.5em 1em;
    font-size: 0.9rem;
  }
  
  .tooltip {
    
    
    top: auto;
    
    
  }
   main {
    padding: 0 10px;
  }

  .form-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .intro,
  .preview-form,
  .preview-content {
    padding: 1rem;
    border-radius: 10px;
    background-color: #1c1c1c;
  }

  .intro h1,
  .intro h2,
  .preview-form h1 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  form {
    width: 100%;
  }

  fieldset {
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 5px;
  }

  label {
    display: block;
    margin: 0.4rem 0;
  }

  button,
  #prevBtn1,
  #nextBtn1,
  #prevPage,
  #nextPage {
    width: 100%;
    padding: 10px;
    margin-top: 0.5rem;
    font-size: 1rem;
    border-radius: 6px;
    background-color: #333;
    color: white;
    border: none;
  }

  #searchBar {
    width: 100% !important;
    font-size: 1rem;
    margin: 0 auto;
  }

  #planetContainer {
    margin-top: 1rem;
  }

  .tooltip {
    padding: 1rem;
    font-size: 0.9rem;
  }

  .tooltip img {
    width: 100%;
    height: auto;
    margin-top: 0.5rem;
  }

  #pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 1rem;
  }

  .dropdown,
  .more-btn,
  .more-info {
    font-size: 0.9rem;
  }  
  
  
  
  

  
/*
  .planet-card {
    margin: 0.5rem 0;
    padding: 0;
    border-radius: 8px;
  }

  .planet-img {
    border-radius: 0;
    aspect-ratio: 1 / 1;
  }

  .preview-content,
  .preview-form {
    padding: 0.5rem;
    border-radius: 8px;
  }

  .flex-list {
    column-count: 1;
    column-gap: 0;
    padding: 2px;
  }

  #planetContainer {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  #pagination {
    margin-top: 10px;
  }

  #pagination button,
  #prevBtn1,
  #nextBtn1 {
    font-size: 0.95rem;
    padding: 6px 10px;
  }

  .parent-container {
    margin: 0.5em 0;
  }

  .toggle-button {
    margin-right: 4px;
    font-size: 1rem;
  }

  .children {
    margin-left: 10px;
  }

  .tooltip img {
    aspect-ratio: 1 / 1;
    border-radius: 4px;
  }

  .tooltip p {
    font-size: 0.95rem;
  }

  .more-btn {
    font-size: 0.95rem;
  }

  .more-info.open {
    max-height: 200px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem;
  }

  nav ul li {
    margin-bottom: 0.5rem;
  }*/

}
 