*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
* {
  font-family: serif;
}
body {
  /* display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center; */
  background-color: #ababab;
  /* background: linear-gradient(to top, #3f4141, #d0cfcf); */
  /* background: linear-gradient(to bottom, #060c0b, #ffffff); */
  /* Optional: Ensures the background covers the entire viewport */
  min-height: 100vh;
  /* margin: 0; Removes default body margin */
  margin-top: 20px;
  margin-bottom: 20px;
}
h1 {
  color: dodgerblue;
  text-align: center;
  background-color: #ffffff44;
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 2.5rem;
}
.completed {
  text-decoration: line-through;
  color: gray;
}
.not {
  text-decoration: underline;
}

.links {
  border-radius: 5px;
  border: 1px solid dodgerblue;
  background-color: dodgerblue;
  color: white;
  font-size: 1em;
  text-decoration: none;
  padding: 10px 20px;
}

.home-btns {
  width: 300px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 30px;
  margin: 0 auto;
}

.submit-btns {
  color: white;
  background-color: dodgerblue;
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: none;
  border: 0;
  margin-top: 25px;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  text-align: center;
}
.post > div > .submit-btns {
  color: white;
}
.submit-btns:hover {
  filter: brightness(0.95);
}

/* Center the landing content on the page */
.landing {
  min-height: 100vh; /* full viewport height */
  display: flex;
  flex-direction: column;
  justify-content: center; /* vertical center */
  align-items: center; /* horizontal center */
  gap: 24px; /* space between title and buttons */
  text-align: center;
}

/* Buttons row already centered; keep it tidy on narrow screens */
.home-btns {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.delete-btns {
  color: white;
  background-color: rgb(243, 33, 33);
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: none;
  border: 0;
  margin-top: 25px;
  cursor: pointer;
  height: 37px;
  font-size: 1rem;
}
.delete-btns:hover {
  filter: brightness(0.95);
}
.update-btns {
  color: rgb(0, 0, 0);
  background-color: rgb(189, 189, 189);
  padding: 10px 20px;
  border-radius: 5px;
  box-shadow: none;
  border: 0;
  margin-top: 25px;
  cursor: pointer;
  height: 37px;
  font-size: 1rem;
}
.update-btns:hover {
  filter: brightness(0.95);
}
.edit-del-btns {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.input {
  height: 25px;
  border-radius: 5px;
  text-indent: 10px;
}

.signup {
  display: block;
  margin-top: 15px;
}

.expand-btn {
  display: block;
  width: 100%;
  cursor: pointer;
  text-align: center;
}

.post-form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin: 25px;
  gap: 15px;
}
.post-input {
  display: block;
  width: 100%;
}
.content-area {
  padding: 5px;
  border: 1px solid black;
  height: 20vh;
}

.post {
  margin-top: 10px;
  background-color: #ffffff44;
  padding: 10px 20px;
  border-radius: 5px;
  /* width: 55%; */
}
.post a {
  text-decoration: none;
  color: rgb(0, 117, 251);
}

.post-content {
  margin: 10px 0;
  background-color: #ffffff6d;
  padding: 5px 10px;
  border-radius: 5px;
}
.form-label {
  text-shadow: 1px 1px 4px white;
}
.author {
  font-weight: bold;
}
.post-image {
  height: 20vh;
  border-radius: 7px;
}
.short-content {
  margin: 5px 0;
}

/* Modal styling */
/* Lightbox base */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 1000;
}

.lightbox.hidden {
  display: none;
}

/* The image itself */
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

/* Close button */
.lightbox__close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 2rem;
  line-height: 1;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.post-image {
  cursor: zoom-in;
}

.lightbox:not(.hidden) {
  cursor: zoom-out; /* clicking overlay closes */
}

/* GRID */
.main-grid-container {
  display: grid;
  grid-template-columns: 20% 80%;
}
.main-grid-container > nav {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-items: center;
  gap: 5px;
  margin-top: 100px;
}
.main-grid-container > nav a {
  text-decoration: none;
}
.main-grid-container > nav a:hover {
  filter: brightness(0.95);
}
.nav-btn {
  color: rgb(23, 113, 203);
  background-color: #ffffff44;
  padding: 5px 10px;
  border-radius: 5px;
}

.grid-item {
  margin: 10px;
}

/* Stack to 1 column on small screens */
@media (max-width: 500px) {
  .main-grid-container {
    grid-template-columns: 1fr; /* from 2 cols -> 1 col */
  }

  /* Optional tweaks for nicer mobile layout */
  .main-grid-container > nav {
    margin-top: 0; /* remove big sidebar offset */
    width: 100%;
    align-items: stretch; /* make nav buttons fill width if you want */
  }

  .grid-item {
    margin: 10px 0; /* tighten margins */
  }

  /* If you want full-width nav buttons on mobile */
  .nav-btn {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* COMMENT FORM */
.comment-form {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #e6ecf0;
  background-color: transparent; /* match page background */
  /* height: auto; remove fixed height */
}

/* Avatar */
.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

/* Composer column */
.comment-composer {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Actions row */
.comment-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  position: relative;
  z-index: 2;
}
/* TEXTAREA */
.comment-textarea {
  min-height: 40px;
  max-height: 220px;
  height: auto;
  resize: none; /* prevent manual drag-resizing */
  border: none;
  outline: none;
  font-size: 16px;
  line-height: 1.4;
  background-color: transparent;
  color: #000;
  padding: 8px 0;
  position: relative;
  z-index: 1;
}

/* Post button */
.post-btn {
  background: dodgerblue;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  position: relative;
  z-index: 2;
  pointer-events: auto;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.post-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.post-btn:not([disabled]):hover {
  background: #0d8ddb;
}

/* COMMENT LIST */
.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.comment-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #e6ecf0;
}
.comment-body {
  flex: 1;
}
.comment-meta {
  font-size: 12px;
  color: #536471;
  display: flex;
  gap: 8px;
}
.comment-author {
  font-weight: 600;
  color: #0f1419;
}
.comment-text {
  margin: 4px 0 0;
  white-space: pre-wrap;
}

/* three-dots delete menu */
.comment-item {
  position: relative;
}
.comment-menu {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 20;
}

.menu-btn {
  background: #ababab;
  border: 0;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  width: 20px;
}
.menu-btn:hover {
  filter: brightness(0.95);
}

.menu {
  position: absolute;
  right: 0;
  top: 24px;
  background: #fff;
  border: 1px solid #e6ecf0;
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  z-index: 30;
}

.menu[hidden] {
  display: none;
}

.menu-delete {
  background: none;
  border: 0;
  padding: 6px 8px;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.menu-delete:hover {
  background: #f5f8fa;
}

/* Profile */
.profile-header {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: start;
  background: #ffffff44;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-name {
  margin: 0;
  line-height: 1.2;
}
.profile-bio {
  margin-top: 6px;
}
.profile-stats {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: #536471;
}
.profile-edit {
  align-self: start;
}

/* Mobile */
@media (max-width: 500px) {
  .profile-header {
    grid-template-columns: 56px 1fr;
  }
  .profile-meta {
    padding: 10px 16px;
  }
  .profile-edit {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 8px;
  }
  .userSpecksheading {
    padding-left: 10px;
  }
}
.profile-change-image {
  align-self: start;
}
