/* Base Styles */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  color: #fff;
  background: #000000;
}

a {
  color: #6cff64;
  text-decoration: none;
}

.post-container {
  max-width: 900px;
  margin: 20px auto 150px auto; /* Top, Right/Left, Bottom = extra bottom spacing */
  padding: 10px;
}

/* Post Card */
.post-card {
  background: #1e1e1e;
  border-radius: 12px;
  margin: 20px;
  padding: 15px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.post-content {
  margin-top: 10px;
}

/* Header */
.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #6cff64;
}

/* Text */
h3 {
  margin: 10px 0 5px;
  font-size: 1.2em;
}

p {
  margin: 10px 0;
  font-size: 10pt;
}

/* Media Display */
.custom-video-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  pointer-events: auto;
}

.post-video,
.media-image {
  width: 100%;
  height: 450px;
  display: block;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.post-media-slider {
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* Video Controls */
.custom-controls {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 14px;
  border-radius: 0 0 8px 8px;
  pointer-events: auto;
}

/* Play Overlay */
.video-overlay-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px;
  color: #6cff64;
  padding: 20px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.custom-controls button {
  background: none;
  border: none;
  color: #6cff64;
  font-size: 18px;
  cursor: pointer;
}

.custom-controls input[type="range"] {
  flex: 1;
  accent-color: #6cff64;
}

/* Post Actions */
.post-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
}

.post-actions button {
  background: #222;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-actions button:hover {
  background: #444;
}

.action_like.liked,
.action_like:hover {
  color: #6cff64;
  transform: scale(1.2);
}

.share-btn.shared {
  background: #28a745;
  color: #fff !important;
}

/* Comment Section */
.comment-section {
  background: #222;
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 8px;
}

.comment-input {
  width: 98%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  background: #111;
  color: #fff;
  border: 1px solid #555;
  border-radius: 5px;
}

.post-comment-btn {
  background: #6cff64;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  cursor: pointer;
}

.comments-wrapper {
  max-height: 250px;
  overflow-y: auto;
  padding-right: 10px;
}

/* Comment Box */
.comment-box {
  background: #333;
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  border-radius: 5px;
}

.reply {
  margin-left: 1.5rem;
  background: #444;
}

.reply-input-container {
  margin-top: 0.5rem;
  display: flex;
  gap: 5px;
}

.reply-input {
  width: calc(100% - 60px);
  padding: 0.3rem 0.6rem;
  background: #111;
  color: #fff;
  border: 1px solid #555;
  border-radius: 5px;
}

.submit-reply-btn {
  background: #111;
  color: #6cff64;
  border: 1px solid #ffffff;
  padding: 0.3rem;
  border-radius: 5px;
  cursor: pointer;
}

/* Avatar + Username */
.avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
  vertical-align: middle;
  margin-right: 6px;
  border: 1px solid #6cff64;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.username-small {
  font-size: 0.9em;
  font-weight: 600;
}

.timestamp-small {
  font-size: 0.8em;
  color: #bbb;
  margin-left: auto;
}

/* Action Buttons */
.reply-btn,
.delete-comment-btn,
.delete-reply-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  font-size: 0.85em;
  color: #6cff64;
  margin-top: 5px;
}

.reply-btn:hover,
.delete-comment-btn:hover,
.delete-reply-btn:hover {
  text-decoration: underline;
}

/* Slider */
.media-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
  border-radius: 12px;
  margin-bottom: 10px;
}

.media-slide {
  display: none;
  width: 100%;
}

.media-slide.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

/* Dots */
.media-dots {
  text-align: center;
  margin-top: 5px;
}

.media-dots .dot {
  display: inline-block;
  height: 10px;
  width: 10px;
  margin: 0 4px;
  background-color: #666;
  border-radius: 50%;
  cursor: pointer;
}

.media-dots .dot.active {
  background-color: #6cff64;
}

/* Heart Animation */
.like-heart {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 80px;
  color: #ff3366;
  opacity: 0;
  pointer-events: none;
  animation: popHeart 0.6s ease-out forwards;
  z-index: 100;
}

@keyframes popHeart {
  0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Depth Levels */
.comment-box[data-depth="0"] { margin-left: 0; }
.comment-box[data-depth="1"] { margin-left: 20px; }
.comment-box[data-depth="2"] { margin-left: 40px; }
.comment-box[data-depth="3"] { margin-left: 60px; }

.toggle-replies {
  font-size: 0.9em;
  margin-bottom: 4px;
  cursor: pointer;
  color: #6cff64;
}

/* Icons */
.like_svg, .comment_svg, .share_svg {
  width: 20px;
  height: 20px;
  display: block;
  margin: 0;
  padding: 0;
}

.comment_svg,
.share_svg {
  margin-left: 10px;
  margin-top: 5px;
}

/* Login Modal */
.login-modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.login-modal-content {
  background: #222;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  color: white;
  max-width: 300px;
  box-shadow: 0 0 10px rgba(0,0,0,0.7);
}
.login-modal-buttons button {
  background: #6cff64;
  border: none;
  padding: 10px 20px;
  margin: 10px 5px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}
.login-modal-buttons button:last-child {
  background: #555;
}

/* Link Styling */
.post-content p a {
  color: #6cff64;
  text-decoration: underline;
  font-weight: 600;
}
.post-content p a:hover {
  color: #baff9b;
  text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .post-card {
    margin: 20px 10px;
  }

  .post-video,
  .media-image {
    height: auto;
    max-height: 300px;
  }

  .post-actions {
    flex-wrap: wrap;
    gap: 10px;
  }
}
