body,
html {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: black;
}

canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Keeps the canvas in the background */
}

.community {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  pointer-events: auto;
  position: fixed;
  top: 0px;
  width: 100%;
  background-color: #101e35;
  z-index: 100;
}

#hero-section {
  height: 100dvh;
  display: flex;
  align-items: center;
  background: url("assets/images/bg-earth.png") no-repeat center/contain;
  background-position-y: bottom;
}

.site-title-container, .site-login {
  padding: 20px;
  font-size: clamp(10px, 3vw, 15px);
  font-weight: bold;
  letter-spacing: 1px;
  width: fit-content;
}

#user-div {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.notification {
  padding: 10px;
  width: clamp(13px, 1vw, 15px);
  height: clamp(13px, 1vw, 15px);
  background-color: rgba(255,255,255,.4);
  border-radius: 50%;
  font-size: clamp(13px, 1vw, 15px);
  text-align: center;
  margin-right: clamp(5px, 1vw, 10px);
}

.community-button {
  position: relative;
  margin-top: 50px;
}

.author-pfp {
  width: 30px;
  height: 30px;
  margin-right: 5px;
  display: flex;
  background-color: grey;
  border-radius: 50px;
  align-items: center;
  justify-content: center;
  border: 1px grey solid;
}

.author-pfp img {
  width: 30px;
  height: 30px;
}

.post-footer {
  display: flex;
  position: relative;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.post-comments {
  margin-right: 7px;
  font-size: 13px;
  color: #fff;
}

.community-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-right: 5px;
}

.community-title h2 {
  font-size: clamp(12px, 5vw, 35px);
  color: white;
  margin: 20px 0;
}
#community-underline {
  border-bottom: 5px white solid;
  width: 150px;
  position: absolute;
  bottom: 0px;
}

.community-content {
  padding: 10%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.create-post {
  padding: 1rem 1.5rem;
  background-color: #158d6d;
  border: none;
  color: white;
  cursor: pointer;
  border-radius: 5px;
  display: block;
  width: max-content;
  text-decoration: none;
}

.main-content {
  box-sizing: border-box;
}

#hero-content {
  padding: 20px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: fit-content;
  justify-content: center;
  text-align: center;
  margin-bottom: clamp(0px, 15vw, 200px);
}

#hero-content h1 {
  font-size: clamp(40px, 5vw, 60px);
  color: white;
  box-sizing: border-box;
  margin: 20px;
}

#hero-tag {
  width: 100%;
  box-sizing: border-box;
}

#hero-tag h3 {
  margin: 20px;
  color: #ef480e;
  font-size: clamp(20px, 5vw, 30px);
}

.recent-posts {
  position: relative;
}

.banner {
  position: absolute;
  width: 100%;
  box-sizing: border-box;
  height: 80px;
  background-color: #050504;
  top: 0px;
  z-index: 0;
}

.recent-posts-div {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
  padding-top: 2rem;
}

.recent-posts h2 {
  margin-bottom: 20px;
}

.search-bar {
  width: 100%;
  display: flex;
}

.search-bar input {
  padding: 10px 20px;
  margin-bottom: 20px;
  font-size: 1rem;
  width: 100%;
  border-radius: 10px;
  background-color: #c3daff;
  color: black;
  border: 1px solid #c3daff;
}

.content {
  display: grid;
  align-items: start;
  grid-template-columns: 0.25fr 1fr;
  gap: 40px;
}

.categories {
  width: 100%;
  display: flex;
  flex-direction: column;
  height: fit-content;
  padding: 0 20px;
  padding-bottom: 20px;
  background-color: #050504;
}

.category-button-title {
  position: relative;
  display: flex;
  align-items: center;
  white-space: nowrap;
  transition: background-color 300ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.6rem 1rem;
  margin: 4px 0;
  background-color: #393d48;
  color: white;
  height: auto;
  border-radius: 10px;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
  font-weight: bold;
}

.category-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  white-space: nowrap;
  transition: background-color 300ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0.6rem 1rem;
  color: white;
  height: auto;
  border-radius: 10px;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
}

.category-button:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

.category-button a {
  text-decoration: none;
  color: white;
}

.category-button span {
  font-size: 15px;
  font-weight: bold;
}

.posts {
  width: 80%;
  display: flex;
  flex-direction: column;
}

.post-cards {
  width: 100%;
  padding: 0 40px;
  box-sizing: border-box;
  border-left: 2px #88391d solid;
}

.post-cards-header {
  width: 100%;
  display: flex;
  margin-bottom: 25px;
  position: relative;
  align-items: center;
  margin-top: 15px;
}

.post-create-div, .my-posts-div, .sort-div {
  padding: 0 10px;
}

.post-create-button {
  border-radius: 2rem;
  padding: .6rem 1rem;
  background-color: white;
  color: #000;
  font-weight: 300;
  font-size: clamp(14px, 3vw, 16px);
  text-decoration: none;
}

.post-create-div span, .my-posts-div span {
  margin-left: 5px;
}

.my-posts-div, .sort-div  {
  color: #fff;
  font-weight: 400;
  font-size: clamp(14px, 3vw, 16px);
}

.my-posts-button {
  text-decoration: none;
  color: #fff;
}

.sort-div  {
  position: absolute;
  right: 0px;
}

.sort-button {
  background: none;
  border: none;
  font-size: clamp(14px, 3vw, 16px);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #fff;
}

.sort-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  padding: 5px 0;
  margin-top: 5px;
  z-index: 1000;
  width: 150px;
}

.hidden {
  display: none;
}

.sort-menu li {
  list-style: none;
}

.sort-menu .sort-option {
  display: block;
  padding: 8px 12px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.sort-menu .sort-option:hover {
  background-color: #f4f4f4;
}

.post-card-full {
  margin-bottom: 20px;
}

.post-card {
  padding: 20px;
  background-color: #0c1524;
  border-radius: 10px;
  position: relative;
  padding-left: 28px;
}

.post-card:hover {
  background-color: #16243c;
}

.color-tag {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 8px;
  height: 100%;
  border-radius: 10px 0 0 10px;
}

.post-card h1 {
  color: #fff;
  font-size: 20px;
  margin: 0.5rem 0px;
}

.post-card p {
  color: #8ca9d0;
  font-size: 16px;
  margin-top: 0px;
}

.post-card .category-button {
  background: #158d6d;
  border-color: #158d6d;
  margin: 20px 0 0 0;
  padding: 5px 10px;
}

.post-card .category-button span {
  font-size: 16px;
  font-weight: bold;
}

.post-author {
  color: #fff;
  font-size: 13px;
  display: flex;
  column-gap: 5px;
  align-items: center;
  font-weight: bold;
  margin-right: 10px;
}

.post-header {
  display: flex;
  align-items: center;
  column-gap: 10px;
}

.post-category-button {
  background-color: rgb(88, 101, 242);
  color: white;
  border-radius: 0.3rem;
  padding: 0.1rem 0.4rem;
  text-decoration: none;
  font-weight: 400;
  font-size: 13px;
  text-wrap: nowrap;
}

.post-card time {
  display: block;
  color: #e1e1e1;
  font-size: 13px;
  text-wrap: nowrap;
}

.upvote svg, .downvote svg {
  padding-left: 7px;
}

.upvote span, .downvote span {
  padding: 0px 7px;
}

.upvote, .downvote {
  margin-right: 10px;
  background-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  cursor: pointer;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 400;
  display: flex;
  align-items: center;
  width: fit-content;
  height: 30px;
}

.post-reactions {
  display: flex;
  align-items: center;
  width: fit-content;
  margin-top: 30px;
}

.upvote img {
  width: 27px;
  margin-right: 5px;
}

.feedback-message {
  display: none;
  position: relative;
  left: 0;
  color: #ff0101;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
}

#pageSelect {
  position: relative;
  cursor: pointer;
}

.page-select-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  background: grey;
  border-radius: 5px;
  font-size: 12px;
  cursor: pointer;
  column-gap: 8px;
}

.page-select-wrapper i, .page-select-wrapper svg {
  cursor: pointer;
}

.selected-option {
  border-radius: 5px;
}

.dropdown-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #5b5b5b;
  z-index: 1000;
  width: 82px;
  border-radius: 5px;
  padding: 5px 0px;
  max-height: 150px;
  overflow-y: auto;
}

.dropdown-options::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.dropdown-options::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 5px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

.dropdown-options::-webkit-scrollbar-track {
  background: transparent;
}

.dropdown-option {
  padding: 5px 0px;
  cursor: pointer;
  width: 100%;
  text-align: center;
  border-radius: 5px;
}
.dropdown-option:hover {
  background: gray;
}

#pageSelect.active .dropdown-options {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pagination {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
}

.pagination-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 10px;
  border-radius: 5px;
  border: none;
  background: grey;
  color: white;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
}

.pagination-btn i, .pagination-btn svg {
  font-size: 12px;
  font-weight: 600;  
  cursor: pointer;
}

@media (max-width: 750px) {
  .community-title p {
    color: black;
  }

  .content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 30px;
  }
  
  .color-tag {
    width: 5px;
  }
  
  .post-cards {
    border: none;
  }
}

@media (max-width: 530px) {
  body {
    background-position-x: center;
    background-size: contain;
  }
  
  #community-underline {
    display: none;
  }
  
  .shop-title {
    padding: 3px;
  }
  
  .site-title-container, .site-login {
    padding: 10px;
    font-weight: 400;
  }
  
  .site-login {
    padding-left: 0px;
  }
  
  .nav-title a {
    flex-direction: column;
    align-items: flex-start;
    column-gap: 5px;
    text-wrap: nowrap;
  }

  .login-btn {
    padding: 8px !important;
  }

  .community-title p {
    color: white;
  }

  .search-bar input {
    padding: 5px 10px;
    font-size: 15px;
    border-radius: 15px;
  }

  .content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 30px;
  }

  .categories {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    margin-bottom: 0px;
  }

  .category-button span,
  .post-author,
  .post-card p,
  .post-card .category-button span,
  .post-card time {
    font-size: 12px;
  }
  
  .post-create-button {
    padding: 7px 10px;
  }
  
  .post-cards {
    border: none;
    padding: 0 10px;
  }
  
  .post-category-button {
    font-weight: 400;
  }

  .post-card-full {
    width: auto;
    margin-bottom: 40px;
  }

  .post-card {
    border-radius: 5px;
    border-left-width: 4px;
    padding: 10px;
    padding-left: 15px;
  }

  .post-card h1 {
    font-size: 15px;
  }
}
