:root {
  --bg-color: #2c2f33;
  --text-color: #ccc;
  --sub-text-color: #333333;
  --button-color: #5865f2;
  --button-hover: #4751c7;
  --text-size: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
}

body::-webkit-scrollbar {
  display: none;
}

/* Navbar Styles */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #23272a;
  padding: 10px 20px;
  color: white;
}

.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}

.navbar .search-bar {
  flex: 1;
  margin: 0 20px;
}

.navbar .search-bar input {
  width: 100%;
  padding: 8px;
  font-size: 1rem;
  border-radius: 5px;
  border: none;
  background-color: #40444b;
  color: white;
}

.navbar .plus-icon {
  font-size: 1.5rem;
  cursor: pointer;
}

.navbar .plus-icon:hover {
  color: #7289da;
}

.navbar .plus-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

/* Sign Up Form Styles */
.form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  max-width: 100%;
  width: 100%;
}

.signup-form {
  width: 100%;
  max-width: 400px;
  background-color: #36393f;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  color: white;
}

.form-group {
  margin-bottom: 1.25rem;
  width: 100%;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #b9bbbe;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border-radius: 3px;
  border: 1px solid #202225;
  background-color: #303339;
  color: white;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: #7289da;
  outline: none;
}

.terms-checkbox {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
}

.terms-checkbox input {
  margin-right: 0.75rem;
  width: auto;
}

.terms-checkbox label {
  font-size: 0.875rem;
  color: #b9bbbe;
}

.terms-checkbox a {
  color: #7289da;
  text-decoration: none;
}

.terms-checkbox a:hover {
  text-decoration: underline;
}

.submit-btn {
  width: 100%;
  padding: 12px;
  background-color: var(--button-color);
  color: white;
  border: none;
  border-radius: 3px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.submit-btn:hover {
  background-color: var(--button-hover);
}

.login-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #b9bbbe;
}

.login-link a {
  color: #7289da;
  text-decoration: none;
}

.login-link a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .signup-form {
    padding: 1.5rem;
  }

  .form-title {
    font-size: 1.25rem;
  }
}

.footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  color: #99aab5;
  font-size: 0.9rem;
}

/* Modal Styling */
.modal {
  display: none;
  position: absolute;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
}

.modal-content {
  background-color: #2c2f33;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  margin: 10% auto;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid #5865f2;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 8px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #40444b;
  color: #fff;
}

.modal-content button {
  width: 100%;
  padding: 10px;
  background-color: #5865f2;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.modal-content button:hover {
  background-color: #4751c7;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}

#tags-container {
  display: flex;
  flex-wrap: wrap;
  /* Allow buttons to wrap to the next line */
  gap: 10px;
  /* Space between buttons */
}

.tag-button {
  background-color: #5865f2;
  /* Background color */
  color: white;
  /* Text color */
  border: none;
  /* Remove border */
  border-radius: 5px;
  /* Rounded corners */
  padding: 8px 12px;
  /* Padding for comfort */
  font-size: 0.9rem;
  /* Font size */
  cursor: pointer;
  /* Change cursor on hover */
  transition: background-color 0.3s;
  /* Smooth transition */
  max-width: 100px;
  /* Set a maximum width for each button */
  flex: 1 1 20%;
  /* Allow buttons to grow and shrink */
  text-align: center;
  /* Center text inside button */
}

.tag-button:hover {
  background-color: #4752c4;
}

.tag-button.selected {
  background-color: rgb(0, 55, 255);
}

a {
  color: gray;
}

a:hover,
a:focus {
  color: white;
}

/* Basic styles for the custom context menu */
.context-menu {
  position: absolute;
  background-color: #444;
  border-radius: 5px;
  padding: 8px;
  display: none;
  z-index: 1000;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

.context-menu button {
  background: none;
  color: #ff5555;
  border: none;
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.context-menu button:hover {
  background-color: #555;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #444;
  color: white;
  z-index: 1;
  min-width: 150px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-content button {
  width: 100%;
  padding: 10px;
  color: white;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}

.dropdown-content button:hover {
  background-color: #555;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.about-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 25px;
  margin-bottom: 25px;
}

.about {
  font-size: 25px;
}

.about-buttons {
  margin-top: 25px;
  margin-bottom: 25px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.about-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #5865f2;
  color: #fff;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 8px;
  text-transform: uppercase;
  text-decoration: none;
  margin: 5px;
  box-shadow: 2px 2px #3344ff;
  transition: all 0.2s ease-in-out;
}

.about-button:hover {
  background-color: #3344ff;
  box-shadow: 0 6px #5865f2;
  transform: translateY(-2px);
}

/* Listings Container */
.listings {
  margin: 0 auto;
  max-width: 1000px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 20px;
}

/* Listing Card Styles */
.listing-card {
  background-color: #36393f;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s;
  cursor: pointer;
  position: relative;
}

.listing-card:hover {
  background-color: #40444b;
}

.post-card {
  background-color: #36393f;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s;
  cursor: pointer;
  position: relative;
}

.post-card:hover {
  background-color: #40444b;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 15px;
}

.listing-info {
  flex: 1;
}

.listing-info h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  color: #fff;
}

.listing-info p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
}

.tags {
  margin-top: 25px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-height: 100px;
  /* Limit height for tags overflow */
  overflow-y: auto;
}

.tags::-webkit-scrollbar {
  display: none;
}

.tag {
  background-color: #5865f2;
  color: white;
  padding: 5px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Badge Icons */
.badge-icons {
  display: flex;
  gap: 5px;
  /*margin-top: 10px;*/
}

.badge-icon {
  font-size: 1.5rem;
  /* Adjust size */
  color: #5865f2;
  /* Default color */
  margin-right: 5px;
  /* Spacing between icons */
}

.badge-container {
  position: relative;
  display: inline-block;
}

.badge-tooltip {
  visibility: hidden;
  background-color: black;
  color: #fff;
  text-align: center;
  padding: 5px 8px;
  border-radius: 5px;
  position: absolute;
  bottom: 120%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 12px;
  opacity: 0;
  transition: opacity 0.2s;
}

.badge-container:hover .badge-tooltip {
  visibility: visible;
  opacity: 1;
}

.post-form {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.post-content {
  background-color: #313338;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: 90%;
  max-width: 400px;
  box-sizing: border-box;
}
