body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100vw;
}

img {
  object-fit: cover;
  border-radius: 5px;
}

main {
  margin-top: 100px;
  margin-bottom: 50px;
  width: 60%;
  max-width: 100%;
}

.blog-meta {
  font-size: 0.8em;
  color: #aaa;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  margin-bottom: 2em;
}

.blog-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5em;
  color: #fff;
  padding: 0 10px;
}

.blog-summary {
  font-size: 1.1rem;
  color: #d8d4cf;
  margin-bottom: 1em;
  padding: 0 10px;
}

.blog-author {
  width: 100%;
  flex-wrap: wrap;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  margin-bottom: 20px;
}

.blog-author img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 1em;
}

.blog-author-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.2em;
}

.blog-author-name {
  font-size: .9rem;
}

.blog-date {
  font-size: 0.9rem;
  color: #aaa;
}

.blog-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
  padding: 0 10px;
}

.blog-content h1, h2, h3, h4, h5, h6 {
  margin-top: 20px;
  color: #fff;
  font-size: 1.5rem;
}

.blog-content p {
  font-size: 1rem;
  width: 100%;
  margin-top: 10px;
}

.blog-content a {
  color: #ffdf90 !important;
}

.blog-cover-image {
  width: 100%;
  height: 300px;
  margin-bottom: 1em;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.blog-content ol {
  list-style-type: decimal;
  margin-left: 20px;
}

.blog-content ul {
  list-style-type: disc;
  margin-left: 20px;
}

.blog-content li {
  font-size: 1rem;
  margin-top: 10px;
  padding-left: 10px;
  text-indent: -10px;
  position: relative;
}

.blog-content h1, h2, h3, h4, h5, h6 {
  margin-top: 30px;
  color: #fff;
}

.blog-content img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 5px;
  margin: 10px 0;
  margin-bottom: 20px;
}


.blog-cover-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
  margin: 0 10px;
}

pre {
  width: 100%;
  overflow-x: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

pre code {
  border-radius: 5px;
  width: 100%;
  margin: 1em 0;
  padding: 10px;
}

pre code span {
  font-size: 1rem;
  width: 100%;
}

.blog-suggested-blogs-list{
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: stretch; /* Ensure items stretch to the same height */
    justify-content: flex-start;
  flex-wrap: wrap;
  gap: 1em;
}

.blog-suggested-blog {
  flex: .5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1em;
  padding: 10px;
  border-radius: 5px;
  background-color: #2c2c2c;
}

.blog-suggested-blog a {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.blog-suggested-blog-cover-image {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.blog-suggested-blog-cover-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 5px;
}

.blog-suggested-blog-title {
  font-size: 1.1rem;
  text-align: left;
  color: #fff;
  margin-top: 0.5em;
  font-weight: bold;
}

.blog-comments, .blog-suggested-blogs {
  padding: 0 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgb(52, 56, 58);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1em;
}

.blog-comment-form {
  width: 100%;
}

form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

input[type="text"],
textarea {
  font: inherit;
  font-size: 0.9rem;
  width: 100%;
  height: 200px;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #aaa;
  margin-bottom: 1rem;
  background-color: #1f1b13;
  color: #fff;
}

.blog-comments-header p {
  font-size: 0.9rem;
  color: #aaa;
}

.comment-form-footer {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 1em;
}

.comment-form-footer button {
  padding: 15px 20px;
  border-radius: 5px;
  border: none;
  background-color: #1f1b13;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}

.comment-form-footer p {
  text-align: justify;
  font-size: 0.9rem;
  color: #aaa;
}

.blog-comments-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1em;
  margin-top: 20px;
}

.blog-comment {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 5px;
  border-radius: 5px;
  background-color: #1f1b13;
}

.blog-comment-author {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 5px;
  padding: 10px 10px 0 10px;
}

.blog-comment-author img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  padding-top: 5px;
}

.blog-comment-author-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  flex-wrap: wrap;
}

.blog-comment-author-name {
  font-size: 0.9rem;
  color: #fff;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  fill: #fff;
}

.moderator-comment .blog-comment-author-name::after {
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='15' viewBox='0 -960 960 960' width='15'%3E%3Cpath d='m344-60-76-128-144-32 14-148-98-112 98-112-14-148 144-32 76-128 136 58 136-58 76 128 144 32-14 148 98 112-98 112 14 148-144 32-76 128-136-58-136 58Zm94-278 226-226-56-58-170 170-86-84-56 56 142 142Z' fill='%23ffffff'/%3E%3C/svg%3E");
  font-size: 0.9rem;
  vertical-align: middle;
  padding-top: 3px;
}

.blog-comment-date {
  font-size: 0.9rem;
  color: #aaa;
}

.blog-comment-content {
  text-align: left;
  padding: 10px 10px 20px 10px;
  font-size: 0.9rem;
  color: #fff;
}

.blog-comment-actions {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 1em;
  padding: 0 10px 10px 10px;
}

.blog-authentication-notice {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 15px 15px 15px 15px;
  background-color: #f0ad4e;
  border-radius: 5px;
  min-height: 40px;
  font-size: 0.9rem;
  color: #000;
}


.blog-authentication-notice a {
  color: #000;
}

.delete-comment {
  padding: 15px 20px;
  border-radius: 5px;
  border: none;
  background-color: #bb2124;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}

.blog-actions {
  margin-left: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 1em;
  padding: 0 10px 0px 10px;
}

.blog-actions button {
  padding: 15px 20px;
  border-radius: 5px;
  border: none;
  background-color: #1f1b13;
  color: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  font: inherit;
}


/* Text Alignment */
.ql-align-left {
  text-align: left;
}

.ql-align-center {
  text-align: center;
}

.ql-align-right {
  text-align: right;
}

.ql-align-justify {
  text-align: justify;
}

/* Text Direction */
.ql-direction-rtl {
  direction: rtl;
}

/* Font Style */
.ql-font-serif {
  font-family: serif;
}

.ql-font-monospace {
  font-family: monospace;
}

/* Font Size */
.ql-size-small {
  font-size: 0.75em;
}

.ql-size-large {
  font-size: 1.5em;
}

.ql-size-huge {
  font-size: 2.5em;
}

/* Formatting */
.ql-bold {
  font-weight: bold;
}

.ql-italic {
  font-style: italic;
}

.ql-underline {
  text-decoration: underline;
}

.ql-strike {
  text-decoration: line-through;
}

/* List Formatting */
.ql-list-ordered {
  list-style-type: decimal;
}

.ql-list-bullet {
  list-style-type: disc;
}

/* Code Block */
.ql-code-block {
  background-color: #f0f0f0;
  font-family: monospace;
  padding: 10px;
  border-radius: 5px;
}

/* Blockquote */
.ql-blockquote {
  border-left: 4px solid #ccc;
  margin: 1.5em 10px;
  padding: 0.5em 10px;
  color: #555;
}

/* Indentation */
.ql-indent-1 {
  padding-left: 3em;
}

.ql-indent-2 {
  padding-left: 6em;
}

.ql-indent-3 {
  padding-left: 9em;
}

.ql-indent-4 {
  padding-left: 12em;
}


@media screen and (max-width: 800px) {
  main {
    width: 90%;
    padding: 0 10px;
  }

  img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
  }

  .blog-cover-image {
    height: 200px;
  }
  
  .blog-suggested-blog {
    flex: auto;
    width: 100%;
  }

  .blog-actions {
    margin-left: 0;
    margin-top: 20px;
    justify-content: flex-start;
    padding: 0 10px 0px 10px;
  }

}

@media (max-width: 768px) {
  main {
    width: 90%;
  }

  .blog-cover-image {
    height: 200px;
  }
}


/* Responsive for mobile */
@media (max-width: 768px) {
  /* Ensure all text wraps properly */
    body,
    main,
    .blog-content,
    .blog-summary,
    .blog-title,
    .blog-comment-content {
      word-wrap: break-word;
      word-break: break-word;
      overflow-wrap: break-word;
      width: 100%;
      max-width: 100vw;
      box-sizing: border-box;
    }
  
    /* Make sure <pre> blocks scroll on overflow */
    pre {
      max-width: 100vw;
      overflow-x: auto;
    }
  main {
    width: 90%;
    margin-top: 60px;
    margin-bottom: 40px;
  }

  .blog-title {
    font-size: 2rem;
    margin-top: 0.5em;
   }

  .blog-summary {
    font-size: 1rem;
  }

  .blog-content h1,
  .blog-content h2 {
    font-size: 1.3rem;
  }

  .blog-comment-content,
  .blog-comment-author-name,
  .blog-comment-date {
    font-size: 0.85rem;
  }
}