
        .comments {
            color: inherit;
            background-color: inherit;
            margin: 0;
            padding: 0;
        }


    .comments-section {
      text-align: left;
      margin: 20px auto;
      max-width: 500px;
      width: 92%;
      background-color: rgba(99, 146, 248, 0.1);
      padding: 10px;
      border-radius: 8px;
      border: 1px solid #6392f8;
    }

.comments .comments-section h2 {
    color: #63a4ff;
    font-size: 100%;
    margin-bottom: 5px;
    margin-top: 0px;
}

.comments .comments-section > form {
    background-color: rgba(99, 146, 248, 0.1);
    border: 1px solid rgb(99 146 248 / 30%);
    border-radius: 6px;
    padding: 5px;
    display: flex;
    flex-direction: column;
}

    .comments .comments-section > form textarea {
      height: 100px;
      padding: 10px;
      border: 1px solid #6392f8;
      border-radius: 4px;
      resize: vertical;
      font-size: 14px;
      color: #e1e3e8;
      background-color: rgba(99, 146, 248, 0.1);
    }

        /* Placeholder text color */
        .comments-section textarea::placeholder {
            color: rgb(192 211 252 / .5);
        }


.comments .comments-section > form input[type="submit"] {
      margin-top: 10px;
      padding: 10px;
      background-color: rgba(99, 146, 248, 0.35);
      border: 1px solid #6392f8;
      border-radius: 5px;
      color: #fff;
      font-size: 16px;
      cursor: pointer;
      transition: background-color 0.3s ease;
      width: 100%;
      max-width: 100%;
}

.comments .comments-section > form input[type="submit"]:hover {
    background-color: #5591e6;
}

.comments .comments-display {
    max-height: 500px; /* Increased to accommodate nested replies */
    overflow-y: auto;
    padding-right: 10px;
}

.comment-item {
    margin-bottom: 15px;
    position: relative;
    padding: 10px;
    background-color: rgba(99, 146, 248, 0.1);
    border: 1px solid rgb(99 146 248 / 30%);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

        .comment-item:hover {
            background-color: rgba(39, 133, 201, 0.1);
        }

.comment-item strong {
    color: rgb(99 146 248 / 80%);
    font-size: 70%;
}

.comment-item span {
    display: block;
    white-space: pre-wrap; /* Preserves line breaks and spaces */
    margin-top: 5px;
    color: #c0d3fc;
    font-size: 98%;
}

/* Style for the Reply button */
.comment-item .reply-button {
      margin-top: 5px;
      padding: 5px;
      background-color: rgba(99, 146, 248, 0.35);
      border: 1px solid #6392f8;
      border-radius: 5px;
      color: #fff;
      font-size: 80%;
      cursor: pointer;
      transition: background-color 0.3s ease;
      width: 50px;
      text-align: center;
}
.comment-item .reply-button:hover {
    background-color: #5591e6;
}


        /* Style for the Reply form */
        .reply-form {
            display: none; /* Hidden by default */
            margin-top: 10px;
            margin-left: 20px;
            padding: 10px;
            background-color: rgba(99, 146, 248, 0.1);
            border: 1px solid #6392f8;
            border-radius: 4px;
            transition: all 0.3s ease;
        }


        .reply-form textarea {
            width: 100%;
            height: 60px;
            padding: 8px;
            border: 1px solid #6392f8;
            border-radius: 4px;
            resize: vertical;
            font-size: 14px;
            color: inherit;
            background-color: rgba(99, 146, 248, 0.1);
            margin-bottom: 5px;
        }

.reply-form input[type="submit"] {
      margin-top: 10px;
      padding: 10px;
      background-color: rgba(99, 146, 248, 0.35);
      border: 1px solid #6392f8;
      border-radius: 5px;
      color: #fff;
      font-size: 16px;
      cursor: pointer;
      transition: background-color 0.3s ease;
      width: 100%;
}

.reply-form input[type="submit"]:hover {
    background-color: #5591e6;
}

       /* Smooth transition for reply form visibility */
        .reply-form.show {
            display: block;
            opacity: 1;
            max-height: 500px; /* Arbitrary large value */
        }

        .reply-form.hide {
            opacity: 0;
            max-height: 0;
            overflow: hidden;
        }

        /* Style for the Replies container */
        .replies {
            margin-left: 20px;
            margin-top: 10px;
            border-left: 2px solid rgba(39, 133, 201, 0.3);
            padding-left: 10px;
        }

        /* Ensure nested replies are also indented */
        .replies .replies {
            margin-left: 15px;
            border-left: 1.5px solid rgba(39, 133, 201, 0.2);
        }

        /* Differentiate the main comment form from reply forms */
        .comments-section > form {
            background-color: rgba(39, 133, 201, 0.2);
            border: 1px solid rgba(39, 133, 201, 0.4);
            border-radius: 6px;
            padding: 15px;
            display: flex;
            flex-direction: column;
        }

#message-container {
    display: none; 
    padding: 10px;
    margin-top: 10px;
    border-radius: 4px;
    width: 94%;
}

        #message-container.success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }

        #message-container.error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }

       /* Highlight effect for new comments */
        .comment-item.highlight {
            background-color: #ffffcc; /* Light yellow */
            transition: background-color 1s ease;
        }

        /* Style for reply links */
        .comment-item a {
            color: #63a4ff;
            text-decoration: none;
            font-size: 0.9em;
        }

        .comment-item a:hover {
            text-decoration: underline;
        }

/* Style for Comment Number */
.comment-number {
    font-weight: bold;
    margin-right: 5px;
    color: rgb(99 146 248 / 80%);
    font-size: 80%;
}

.comment-number a {
    color: rgb(99 146 248 / 80%);
    font-size: 100%;
    text-decoration: underline;
}

.comment-number a:hover {
    color: #63a4ff;
}

        /* Highlight animation for linked comments */
        @keyframes highlight {
            from { background-color: yellow; }
            to { background-color: rgba(39, 133, 201, 0.05); }
        }

        .comment-item.highlight-linked {
            animation: highlight 2s forwards;
        }
        
.link-preview {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(39, 133, 201, 0.25);
  border-radius: 8px;
  background: rgba(39, 133, 201, 0.06);
}

.link-preview img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(39, 133, 201, 0.2);
}

.link-preview .lp-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.link-preview .lp-desc {
  font-size: 0.92em;
  opacity: 0.9;
}

.link-preview .lp-host {
  font-size: 0.85em;
  opacity: 0.7;
  margin-top: 6px;
}
        
