body {
  font-family: Arial, sans-serif;
  background-color:  #484a57;
  color: #b1b5bc;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

nav {
  position: fixed;
  width: 100%;
  z-index: 1000;
  top: 0;
}

/* Container for the Page */
.container {
  width: 80%;
  min-height: 70vh;
  margin: 120px auto 20px auto;
  padding: 20px;
  background-color: #484a57;
  border-radius: 8px;

}

.flex {
  display: flex;
}

.form-group {
  width: 100%;
}

label {
  display: block;
  margin-bottom: 10px;
}

input[type="text"],
input[type="password"],
input[type="email"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.btn {
  background-color: transparent;
  color: #b1b5bc;
  padding: 12px 20px;
  border: 1px solid #31ade1;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #31ade1;
}

/* Title */
h1 {
  font-size: 2.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 20px;
  color: #b1b5bc;
}

/* Form Styles */
form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Input and Textarea */
input[type="text"],
textarea {
  width: 100%;
  border-radius: 8px;
  font-size: 1rem;
  background-color: #f9f9f9;
  padding: 10px;
  box-sizing: border-box;
}

/* Textarea specific */
textarea {
  resize: vertical;
  min-height: 150px;
}

/* Form Button */
button[type="submit"] {
  background-color: transparent;
  color: #b1b5bc;
  padding: 12px 20px;
  border: 1px solid #31ade1;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button[type="submit"]:hover {
  background-color: #31ade1;
  color: #fff;
}

/* Button Container */
.button-container {
  display: flex;
  justify-content: space-between;
}

/* General Navbar Styles */
.navbar-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background-color: #484a57;
  color: #b1b5bc;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

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

.navbar-links {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.menu-item {
  color: #b1b5bc;
  padding: 8px 15px;
  text-decoration: none;
  font-size: 1.3rem;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.menu-item:hover {
  color: #31ade1;
  border-bottom: 1px solid #31ade1;
}

.search-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin: 0;
  padding: 0;
}

.search-bar input[type="text"] {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  width: 200px;
}

/* Mobile Responsive Adjustments */
@media screen and (max-width: 576px) {
  .navbar-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .navbar-logo {
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
  }

  .navbar-links {
    justify-content: center;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
  }

  .menu-item {
    font-size: 0.9rem;
    padding: 8px 10px;
  }
}

footer {
  background-color: #484a57;
  color: #b1b5bc;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid #555;
}

@media screen and (max-width: 576px) {
  footer p {
    font-size: 12px;
  }
}

.sidebar {
  width: 30%;
  background-color: #4e5164;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  height: 100%;
  max-height: 600px;
  overflow-y: auto;
}

.sidebar h2 {
  font-size: 20px;
  margin-bottom: 20px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  text-align: left;
}

.sidebar ul li {
  padding: 15px;
  border-top: 1px solid #555;
}

.sidebar ul li a {
  text-decoration: none;
  color: #b1b5bc;
  font-size: 16px;
  transition: color 0.3s;
}

.sidebar ul li a:hover {
  color: #31ade1;
}

.content {
  width: 70%;
  padding: 0 20px;
  height: 100%;
  color: #b1b5bc;
}

.content h1 {
  text-align: center;
  margin-bottom: 20px;
}

.topics-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.topic-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.topic-header i {
  font-size: 30px;
  margin-right: 10px;
}

.topic-header h3 {
  font-size: 18px;
  margin: 0;
  text-decoration: none;
}

.topic-comments {
  display: flex;
  align-items: center;
  font-size: 14px;
  margin: 10px 0;
}

.topic-comments i, .fa-comments {
  margin-right: 5px;
  color: #007bff;
}

a {
  text-decoration: none;
}

.pagination {
  margin-top: 20px;
  text-align: center;
}

.pagination a {
  padding: 10px 15px;
  margin: 0 5px;
  text-decoration: none;
  color: #31ade1;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.pagination a:hover {
  background-color: #f0f0f0;
}

.pagination span {
  padding: 10px 15px;
  /* color: #555; */
}

/* Media Queries for Mobile Responsiveness */
@media screen and (max-width: 576px) {
  .container {
      width: 90%;
      flex-direction: column;
      padding: 10px;
      margin: 180px auto 20px auto;
  }

  .sidebar,
  .content {
      width: 95%;
      padding: 10px;
  }
}

@media screen and (max-width: 576px) {
  .topic-header i {
      font-size: 20px;
  }

  .topic-header h3 {
      font-size: 14px;
  }

  .pagination {
      font-size: 12px;
  }

  .pagination a {
      padding: 6px 10px;
  }

  .sidebar ul li {
      margin-bottom: 8px;
  }

  .sidebar ul li a {
      font-size: 14px;
  }
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  background-color: #4e5164;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.topics-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.topics-table th,
.topics-table td {
  padding: 12px 20px;
  border-bottom: 1px solid #555;
}

.topics-table th {
  font-weight: bold;
}

.topics-table td {
  font-size: 1rem;
}

/* Actions (Edit and Delete) */
.edit-button,
.delete-button {
  color: #31ade1;
  text-decoration: none;
  font-weight: bold;
  margin: 0 5px;
}

.edit-button:hover,
.delete-button:hover {
  text-decoration: underline;
}

.delete-button {
  color: #e74c3c;
}

@media screen and (max-width: 576px) {
  h1 {
    font-size: 2rem;
  }

  input[type="text"],
  textarea {
    font-size: 0.9rem;
  }

  button[type="submit"] {
    font-size: 0.9rem;
  }
}

.link-btn {
  display: block;
  text-align: center;
  color: #31ade1;
  margin-top: 10px;
  font-size: 14px;
  text-decoration: none;
}

.link-btn:hover {
  text-decoration: underline;
}

/* Title */
.page-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.delete-button {
  color: #e74c3c;
}

/* No Topics Found */
.no-topics {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 1.1rem;
}

.topic {
  border-top: 1px solid #555;
  border-bottom: 1px solid #555;
  padding: 15px;
  margin: 15px 0;
  border-left: none;
  border-right: none;
}

.topic-detail {
  border-top: none;
}

.topic .read-more {
  color: #31ade1;
  font-size: 12px;
}

.topic .read-more:hover {
  color: b1b5bc;
}

.topic-header {
  display: flex;
  align-items: center;
}

/* Styling for Avatar Icon */
.topic-header i {
  font-size: 40px;
  color: #007bff;
  margin-right: 10px;
}

.topic-header h3 {
  margin: 0;
  font-size: 16px;
}

.topic-header p {
  font-size: 12px;
  color: #888;
  margin: 0;
}

.topic-info p {
  font-size: 14px;
}

.topic-info a {
  text-decoration: none;
  color: #b1b5bc;
}

.topic-info a:hover {
  color: #31ade1;
}

.topic-content {
  margin-top: 10px;
  font-size: 14px;
}

.comment {
  border: 1px solid #555;
  padding: 10px;
  border-radius: 8px;
  background-color: #4e5164;
  margin-top: 10px;
}

.comment-header {
  display: flex;
  align-items: start;
  gap: 10px;
}

.comment-header i {
  margin-top: 5px;
  font-size: 25px;
  color: #007bff;
}

.comment-header p {
  margin: 0;
}

.comment-header span {
  font-size: 12px;
  color: #888;
}

.comment-button {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 16px;
  background-color: #007bff;
  color: #b1b5bc;
  border-radius: 5px;
  text-decoration: none;
}

.comment-button:hover {
  background-color: #0056b3;
}

.auth-container {
  width: 30%;
  margin: 20px auto;
  padding: 20px;
  border-radius: 8px;
  border: 1px solid #555;
}

.register-container {
  width: 50%;
}

@media screen and (max-width: 576px) {
  .auth-container {
    width: 90%;
    padding: 10px;
  }
  .register-container {
    width: 90%;
  }
}

.auth-container h2 {
  text-align: center;
}

.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media screen and (max-width: 576px) {
  .register-form {
    flex-direction: row;
    flex-wrap: wrap; 
    justify-content: space-between;
  }

  .register-form > * {
    flex: 1 1 calc(50% - 10px); 
    box-sizing: border-box;
  }
}

.topic-form {
  border: 1px solid #555;
  padding: 20px;
}

.create-topic-btn {
  width: fit-content;
  margin: 0 auto;
}

select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 16px;
}

.form-title {
  text-align: center;
}

.button-group {
  display: flex;
  gap: 20px;;
}

.btn-cancel {
  border: 1px solid #e74c3c;
}
.btn-cancel:hover {
  background-color: #e74c3c;
  color: #fff;
}

.create-new-topic {
  text-align: center;
}

.error-message {
  color: #e74c3c;
  text-align: center;
  font-size: 14px;
  margin-top: 10px;
}

.profile-info {
  border: 1px solid #555;
  padding: 20px;
  border-radius: 8px;
  background-color: #4e5164;
}