/* Reset & Base */
body {
  margin: 0;
  /*font-family: Arial, sans-serif;*/
  font-family: 'Inter', sans-serif;
  background: #f5f5f5;
  color: #333;
}

/* Sticky Header */
header {
  position: sticky;
  top: 0;
  background: #fff;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  z-index: 1000;
}

header h1 {
  margin: 0;
}
header h1 a{
    text-decoration: none;
    color: black;
}

#postBtn {
  background: #007bff;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
}

input,
textarea,
select {
  font-size: 16px;
}


.search-bar {
  width: 100%;
  max-width: 600px;
  margin: 1rem auto;
  display: block;
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.section-title {
  text-align: center;
  font-size: 1.2rem;
  margin: 1rem 0;
  color: #333;
  font-weight: 600;
}

/* Posts */
.posts {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

.post {
  background: white;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.post a{
    color: #007bff;
}

/**.meta {
  font-size: 0.9rem;
  color: #777;
}**/

.post-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.profile-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #007bff; /* You can randomize or vary this later */
  opacity: .5;
  flex-shrink: 0;
}

.meta {
  font-size: 0.9rem;
  color: #777;
}


.engagement {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
  font-size: 0.9rem;
  color: #007bff;
}

.engagement a{
    color: #007bff;
    text-decoration: none;
}

/**.comment-btn {
  margin-top: 0.5rem;
  background: #28a745;
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 5px;
  cursor: pointer;
}**/
.comment-section {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.comment-input {
  flex: 1;
  min-height: 20px;
  max-height: 150px;
  resize: none;
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  overflow-y: hidden;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.submit-comment {
  background: #007bff;
  color: white;
  border: none;
  padding: 0.6rem 0.8rem;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
}

.comment-confirm {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: green;
  transition: opacity 0.5s ease;
}

.global-confirm, .global-like-confirm {
  position: fixed;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  background: #28a745;
  color: white;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 999;
  transition: opacity 0.5s ease;
}

.hidden {
  display: none;
}

/* Single page*/
.comment-title {
  text-align: center;
  font-size: 1rem;
  margin: 1rem 0;
  color: #444;
}

.comments {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

.comment-card {
  background: white;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 0 5px rgba(0,0,0,0.1);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 0.3rem;
}

.comment-profile {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: #007bff;
  flex-shrink: 0;
}

.comment-text {
  margin: 0.5rem 0;
  font-size: 0.95rem;
  line-height: 1.4;
}

.comment-actions {
    width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 80%;
  font-size: 0.9rem;
}

.comment-actions .likes {
    float: left;
  color: #28a745;
}

.like-btn {
    float: right;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: #555;
}

.like-btn:hover {
  color: #007bff;
}

.nested-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: #555;
}

.nested-toggle:hover {
  color: #007bff;
}

.nested-comments {
  margin-top: 0.5rem;
  padding-left: 1.5rem;
}

.nested-comment {
  background: #f9f9f9;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

.nested-text {
  margin: 0;
}

.nested-time {
  font-size: 0.75rem;
  color: #777;
}

.nested-input .comment-input {
  font-size: 0.85rem;
}


/* Back button*/
.back-button-container {
  text-align: center;
  margin: 2rem 0;
}

/*.back-button {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.back-button:hover {
  background: #0056b3;
}*/

.btn-float {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
}

.back-button {
  display: inline-block;
  background: #007bff;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background 0.3s ease;
}

.back-button:hover {
  background: #0056b3;
}



/* Popup */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-content {
  background: white;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

.popup textarea {
  width: 100%;
  height: 100px;
  margin-bottom: 1rem;
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.popup button {
  margin-right: 0.5rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.submit-post {
  background: #007bff;
  color: white;
}

.close-popup {
  background: #ccc;
}

.hidden {
  display: none;
}

input,
textarea,
select {
  font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
  header, .posts {
    padding: 1rem;
  }

  .popup-content {
    width: 95%;
  }
}
