body {
  margin: 0;
  font-family: 'Marcellus', serif;
  background: linear-gradient(to bottom, #8d8b89, #e8dfcf);
}

.blog-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  padding: 2rem;
}

.blog-box {
  width: 100%;
  max-width: 65rem;
  min-height: 45rem;
  padding: 2.5rem;
  background: #f3e3b2;
  border: 0.2rem solid #8a6a3f;
  border-radius: 0.6rem;
  box-shadow: 0 0.4rem 1rem rgba(0, 0, 0, 0.2);
}

.blog-top-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.home-link,
.add-post-link,
.logout-link {
  display: inline-block;
  padding: 0.6rem 1rem;
  text-decoration: none;
  background: #6b4b2a;
  color: white;
  border-radius: 0.4rem;
  font-family: 'Marcellus', serif;
}

.add-post-link:hover,
.logout-link:hover,
.home-link:hover {
  background: #50371f;
}

.blog-post {
  margin-bottom: 1.5rem;
}

.post-date {
  text-align: right;
  font-size: 0.9rem;
  color: #6b4b2a;
  margin-bottom: 0.7rem;
}

.post-title {
  font-size: 1.7rem;
  color: #3e2d1a;
  margin-bottom: 0.8rem;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #2f2418;
}

hr {
  border: none;
  border-top: 0.15rem solid #8a6a3f;
  margin-top: 1.2rem;
}

.delete-link {
  display: inline-block;
  margin-top: 0.8rem;
  text-decoration: none;
  background: #8b2e2e;
  color: white;
  padding: 0.5rem 0.9rem;
  border-radius: 0.4rem;
}

.delete-link:hover {
  background: #6d2222;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1rem;
  margin-bottom: 1.8rem;
}

.edit-link,
.delete-link {
  display: inline-block;
  text-decoration: none;
  color: white;
  padding: 0.5rem 0.9rem;
  border-radius: 0.4rem;
  font-size: 1rem;
  line-height: 1.2;
  margin-top: 0;
}

.edit-link {
  background: #4f6f9f;
}

.edit-link:hover {
  background: #334d73;
}

.delete-link {
  background: #8b2e2e;
}

.delete-link:hover {
  background: #6d2222;
}

.month-filter-form {
  margin-bottom: 1.5rem;
}

.month-filter-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: #3e2d1a;
}

.month-filter-form select,
.month-filter-form button {
  padding: 0.5rem;
  font-family: 'Marcellus', serif;
  border: 0.1rem solid #8a6a3f;
  border-radius: 0.4rem;
}


.comments-section {
  margin-top: 2.2rem;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.35);
  border: 0.1rem solid #8a6a3f;
  border-radius: 0.5rem;
}

.comments-section h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #3e2d1a;
  font-size: 1.2rem;
}

.comment-box {
  padding: 0.8rem;
  margin-bottom: 0.8rem;
  background: #f8edc7;
  border-left: 0.25rem solid #8a6a3f;
  border-radius: 0.4rem;
}

.comment-box p {
  margin: 0.3rem 0;
  color: #2f2418;
}

.comment-date {
  font-size: 0.8rem;
  color: #6b4b2a;
}

.comment-form {
  margin-top: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.comment-form textarea {
  width: 100%;
  min-height: 5rem;
  padding: 0.8rem;
  font-family: 'Marcellus', serif;
  font-size: 1rem;
  resize: vertical;
  border: 0.1rem solid #8a6a3f;
  border-radius: 0.4rem;
  background: #fffaf0;
  box-sizing: border-box;
}

.comment-form button {
  align-self: flex-end;
  padding: 0.55rem 1.1rem;
  font-family: 'Marcellus', serif;
  font-size: 1rem;
  background: #6b4b2a;
  color: white;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
}

.comment-form button:hover {
  background: #50371f;
}

.login-to-comment {
  margin-top: 1rem;
  padding: 0.8rem;
  background: #f8edc7;
  border-left: 0.25rem solid #8a6a3f;
  border-radius: 0.4rem;
  color: #3e2d1a;
}

.login-to-comment a {
  color: #6b4b2a;
  font-weight: bold;
  text-decoration: underline;
}

.delete-comment-link {
  display: inline-block;
  margin-top: 0.6rem;
  padding: 0.4rem 0.7rem;
  background: #8b2e2e;
  color: white;
  text-decoration: none;
  border-radius: 0.4rem;
  font-size: 0.9rem;
}

.delete-comment-link:hover {
  background: #6d2222;
}




@media (max-width: 48rem) {

  .blog-layout {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .blog-box {
    width: 90%;
    max-width: 30rem;
  }

  .post-actions {
    justify-content: center;
    flex-wrap: wrap;
  }
}


@media (max-width: 30rem) {


  .blog-box {
    width: 95%;
    padding: 1.2rem;
  }

  .post-title {
    font-size: 1.2rem;
  }

  .post-content {
    font-size: 0.9rem;
  }

  .add-post-link {
    width: 100%;
    text-align: center;
  }

  .post-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .edit-link,
  .delete-link {
    width: 100%;
    text-align: center;
  }

  .comment-form button {
    width: 100%;
    align-self: stretch;
  }

  .blog-top-links {
    flex-direction: column;
    gap: 0.8rem;
  }

  .logout-link,
  .add-post-link {
    width: 100%;
    text-align: center;
  }
}