/* Comment Section Wrapper */
.comment-section {
  background: #252525;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 2rem;
  border: 1px solid #374151;
}

/* Comment Form */
.comment-form textarea {
  width: 100%;
  background: #1f2937;
  border: 1px solid #374151;
  color: #e5e7eb;
  padding: 0.75rem;
  border-radius: 0.5rem;
  resize: vertical;
  min-height: 100px;
}
.comment-form textarea:focus {
  outline: 2px solid #3b82f6;
  border-color: transparent;
}

.toolbar-btn {
  background: transparent;
  border: 1px solid #374151;
  color: #9ca3af;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  cursor: pointer;
  margin-right: 0.25rem;
}
.toolbar-btn:hover {
  background: #374151;
  color: white;
}

/* Comment List */
.comment-list {
  margin-top: 2rem;
}

.comment-item {
  padding: 1rem;
  border-bottom: 1px solid #374151;
  animation: fadeIn 0.3s ease;
  scroll-margin-top: 100px; /* Jarak scroll aman */
}
.comment-item:last-child {
  border-bottom: none;
}

/* Highlight Effect (saat link reply diklik) */
.highlight-comment {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
  transition: background 0.5s;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.user-name {
  font-weight: bold;
  color: #60a5fa;
}
.user-badge {
  background: #3b82f6;
  color: white;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  margin-left: 0.5rem;
}
.comment-date {
  font-size: 0.8rem;
  color: #6b7280;
}

.comment-body {
  color: #d1d5db;
  font-size: 0.95rem;
  line-height: 1.5;
}
.comment-body img {
  max-width: 100%;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

/* Reply Context */
.reply-context {
  font-size: 0.8rem;
  color: #9ca3af;
  background: #1f2937;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  display: inline-block;
  margin-bottom: 0.5rem;
  cursor: pointer;
}
.reply-context:hover {
  color: #60a5fa;
}

/* Actions */
.comment-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
}
.action-link {
  color: #9ca3af;
  cursor: pointer;
  text-decoration: none;
}
.action-link:hover {
  color: #e5e7eb;
  text-decoration: underline;
}

/* Spoiler */
.spoiler-content {
  background: #000;
  color: #000;
  padding: 0 4px;
  border-radius: 3px;
  cursor: pointer;
}
.spoiler-content:hover,
.spoiler-content.revealed {
  color: #fff;
  background: #333;
}

/* Code Block */
code {
  background: #111;
  color: #ff79c6;
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  font-family: monospace;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
