/* Community Page Styles */
/* Community Page Styles */
.header-simple {
  height: 65px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 20px !important;
  background: linear-gradient(135deg, #fdfeff 0%, #ffffff 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-center {
  flex: 0 0 auto;
}

.logo-center a {
  display: inline-block;
}

.logo-center img {
  height: 60px;
  border-radius: 12px;
  transition: transform 0.3s;
}

.logo-center img:hover {
  transform: scale(1.05);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.btn-header {
  padding: 8px 20px;
  border-radius: 20px;
  border: 2px solid #fff;
  background: transparent;
  color: #2b2a2a;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 14px;
}

.btn-header:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-header.primary {
  background: #fff;
  color: #667eea;
}

.btn-header.primary:hover {
  background: #f0f0f0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #fff;
}

.community-container {
  width: 100%;
  max-width: 720px;
  min-height: 1280px;
  margin: 0 auto;
  padding: 0 0 100px;
  background: linear-gradient(to bottom, #f8f9fa 0%, #e9ecef 100%);
}

/* Create Post Card */
.create-post-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s;
}

.create-post-card:hover {
  box-shadow: 0 6px 24px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.create-post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #c9cace, #908b94) border-box;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.btn-create-post {
  flex: 1;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #e0e0e0;
  border-radius: 28px;
  padding: 14px 20px;
  text-align: left;
  color: #666;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 500;
}

.btn-create-post:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  border-color: #667eea;
  transform: translateX(4px);
}

.create-post-actions {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 2px solid #f0f0f0;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  border: 2px solid transparent;
  border-radius: 12px;
  color: #8c8e98;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.action-btn:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-color: #aeaeae;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.action-btn svg {
  color: #898989;
  transition: transform 0.3s;
}

.action-btn:hover svg {
  transform: scale(1.1);
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 10px;
  padding: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 12px 24px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  color: #666;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-tab.active {
  background: linear-gradient(135deg, #9fa1ab, #000000);
  color: #ffffff;
  border-color: #ffffff00;
  box-shadow: 0 4px 16px rgb(218 218 218 / 51%);
  transform: translateY(-2px);
}

.filter-tab:hover:not(.active) {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-color: #191e23;
  transform: translateY(-2px);
}

/* Posts Feed */
.posts-feed {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Post Card */
.post-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid rgba(102, 126, 234, 0.1);
  transition: all 0.3s;
}

.post-card:hover {
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
  transform: translateY(-4px);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.02), rgba(118, 75, 162, 0.02));
}

.post-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid transparent;
  background: linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #c8cbc8, #232323) border-box;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.post-user-info {
  flex: 1;
  min-width: 0;
}

.post-username {
  font-size: 16px;
  font-weight: 700;
  color: #333;
  margin: 0 0 4px;
}

.post-time {
  font-size: 13px;
  color: #999;
  margin: 0;
  font-weight: 500;
}

.btn-post-menu {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(102, 126, 234, 0.05);
  color: #667eea;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-post-menu:hover {
  background: rgba(102, 126, 234, 0.15);
  transform: rotate(90deg);
}

.post-menu {
  position: relative;
}

.post-menu-dropdown {
  position: absolute;
  top: 110%;
  right: 0;
  display: none;
  flex-direction: column;
  min-width: 180px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(102, 126, 234, 0.15);
  z-index: 5;
  overflow: hidden;
}

.post-menu-dropdown.show {
  display: flex;
}

.post-menu-dropdown .menu-item {
  padding: 12px 16px;
  background: transparent;
  border: none;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.post-menu-dropdown .menu-item:hover {
  background: rgba(102, 126, 234, 0.08);
  color: #667eea;
}

.post-content {
  padding: 0 18px 16px;
}

.post-content p {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #333;
  white-space: pre-line;
  font-weight: 400;
}

.post-image {
  width: 100%;
  margin: 16px 0;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
  position: relative;
}

.post-image img {
  width: 100% !important;
  height: auto !important;
  max-height: 600px !important;
  display: block !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  padding: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
}

.post-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 2px solid #f0f0f0;
  background: rgba(102, 126, 234, 0.02);
}

.post-reactions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reaction-icons {
  font-size: 18px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.reaction-count {
  font-size: 15px;
  color: #667eea;
  font-weight: 700;
}

.post-counts {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #999;
  font-weight: 600;
}

.post-counts span:hover {
  color: #667eea;
  cursor: pointer;
}

.post-actions {
  display: flex;
  padding: 10px;
  gap: 6px;
}

.post-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 12px;
  color: #666;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.post-action-btn:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  transform: translateY(-2px);
}

.post-action-btn.active {
  color: #948e8e;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
  border-color: #babbc0;
}

.post-action-btn.active svg {
  fill: #f5f7ff;
}

.like-btn:hover {
  color: #272226;
  border-color: rgba(102, 126, 234, 0.3);
}

.comment-btn:hover {
  color: #aa975f;
  border-color: rgb(175 162 76 / 30%);
}

.share-btn:hover {
  color: #a29d96;
  border-color: rgb(135 125 110 / 30%);
}

/* Comments Section */
.comments-section {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.02), rgba(118, 75, 162, 0.02));
  border-top: 2px solid #f0f0f0;
}

.comment-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid transparent;
  background: linear-gradient(white, white) padding-box,
    linear-gradient(135deg, #cdcece, #58565a) border-box;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.comment-input {
  flex: 1;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 24px;
  padding: 12px 18px;
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
  font-weight: 500;
}

.comment-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px);
}

/* Responsive */
@media (min-width: 768px) {
  .community-container {
    max-width: 720px;
  }

  .create-post-card {
    margin: 20px;
    padding: 20px;
  }

  .user-avatar {
    width: 48px;
    height: 48px;
  }

  .btn-create-post {
    font-size: 16px;
    padding: 14px 18px;
  }

  .action-btn {
    font-size: 15px;
    padding: 12px;
  }

  .filter-tabs {
    padding: 20px 20px 0;
  }

  .filter-tab {
    padding: 12px 24px;
    font-size: 15px;
  }

  .posts-feed {
    padding: 20px;
    gap: 20px;
  }

  .post-header {
    padding: 20px;
  }

  .post-avatar {
    width: 48px;
    height: 48px;
  }

  .post-username {
    font-size: 16px;
  }

  .post-time {
    font-size: 13px;
  }

  .post-content {
    padding: 0 20px 16px;
  }

  .post-content p {
    font-size: 16px;
  }

  .post-stats {
    padding: 14px 20px;
  }

  .post-actions {
    padding: 10px;
  }

  .post-action-btn {
    font-size: 15px;
    padding: 12px;
  }

  .comments-section {
    padding: 16px 20px;
  }

  .comment-avatar {
    width: 36px;
    height: 36px;
  }

  .comment-input {
    font-size: 15px;
    padding: 12px 18px;
  }
}

@media (min-width: 1024px) {
  .community-container {
    max-width: 800px;
  }
}

/* Send Comment Button */
.btn-send-comment {
  background: linear-gradient(135deg, #d1cfcf, #c5c5c5);
  border: none;
  padding: 8px 12px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  color: white;
  margin-left: 8px;
}

.btn-send-comment:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgb(161 166 192 / 40%);
}

.btn-send-comment:active {
  transform: scale(0.95);
}

.btn-send-comment svg {
  display: block;
}

/* Comments List */
.comments-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.comment-item {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-like-comment:hover {
  text-decoration: underline;
  color: #5568d3;
}

.btn-like-comment.active {
  color: #667eea;
  font-weight: 700;
}

/* Reactions Modal */
.reactions-modal {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.reactions-modal>div {
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reaction-filter {
  transition: all 0.2s;
}

.reaction-filter:hover {
  background: #e0e0e0 !important;
  transform: scale(1.05);
}

.reaction-filter.active {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: white !important;
}

.reaction-user {
  transition: all 0.2s;
}

.reaction-user:hover {
  background: #e9ecef !important;
  transform: translateX(4px);
}

/* View Comments/Reactions Link */
.view-comments {
  cursor: pointer;
  transition: all 0.2s;
}

.view-comments:hover {
  color: #667eea;
  text-decoration: underline;
  font-weight: 600;
}

.post-reactions[data-post-id] {
  cursor: pointer;
  transition: all 0.2s;
}

.post-reactions[data-post-id]:hover {
  transform: scale(1.05);
}

.post-reactions[data-post-id]:hover .reaction-icons {
  animation: bounce 0.5s ease;
}

@keyframes bounce {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2);
  }
}

/* Skeleton Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }

  100% {
    background-position: 468px 0;
  }
}

.skeleton {
  background: #f6f7f8;
  background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
  background-repeat: no-repeat;
  background-size: 800px 104px;
  display: inline-block;
  position: relative;
  animation-duration: 1s;
  animation-fill-mode: forwards;
  animation-iteration-count: infinite;
  animation-name: shimmer;
  animation-timing-function: linear;
}

.skeleton-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  border: 1px solid #f0f0f0;
}

.skeleton-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.skeleton-user-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.skeleton-name {
  height: 14px;
  width: 120px;
  border-radius: 4px;
}

.skeleton-time {
  height: 10px;
  width: 80px;
  border-radius: 4px;
}

.skeleton-content-lines {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.skeleton-line {
  height: 12px;
  width: 100%;
  border-radius: 4px;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-image {
  width: 100%;
  height: 200px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.skeleton-actions {
  display: flex;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.skeleton-btn {
  flex: 1;
  height: 36px;
  border-radius: 8px;
}