.bubble {
  position: absolute;
  padding: 10px 20px;
  background-color: #ffffffcc;
  border-radius: 25px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  font-size: 14px;
  color: #333;
  opacity: 0;
  animation: bubbleFloat 2.5s ease forwards;
  pointer-events: none;
  z-index: 5;
}

@keyframes bubbleFloat {
  0% {
    opacity: 0;
    transform: translateX(0) scale(0.9);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-80px) scale(0.7);
  }
}

.pill-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search-input {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input input {
  padding: 6px 12px 6px 32px;
  border: none;
  border-radius: 50px;
  background-color: #5a5c9e;
  color: white;
  font-size: 14px;
  width: 200px;
  transition: 0.3s ease-in-out;
}

.search-input input::placeholder {
  color: #eaeaea;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: white;
  pointer-events: none;
}

.tag-pill {
  background-color: #e6e6f5;
  color: #2d2d2d;
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 50px;
  cursor: pointer;
  transition: 0.2s;
  white-space: nowrap;
}

.tag-pill:hover {
  background-color: #d3d3ec;
}
@media (max-width: 768px) {
  .search-input input {
    width: 100%;
    max-width: 100%;
  }

  .pill-container {
    flex-direction: column;
    align-items: flex-start;
  }
}
.tag-pills-viewport {
  overflow: hidden;
  position: relative;
}

#tag-pills-container.inner-scroll {
  transition: transform 0.3s ease;
  will-change: transform;
}

#affirmation-card {
  max-width: 600px;
  margin: 40px auto;
  border-radius: 16px;
  font-family: 'Segoe UI', sans-serif;
  background-color: transparent;
}

#affirmation-box {
  background: linear-gradient(to right, #fef6f9, #f0f4ff);
  border-radius: 16px;
  padding: 40px 20px;
  font-size: 18px;
  font-weight: bold;
  transition: background 0.3s, transform 0.2s;
}

#affirmation-box:hover {
  background: linear-gradient(to right, #f0f4ff, #fef6f9);
  transform: scale(1.02);
}

#mood-select .mb-2 {
  font-size: 16px;
  margin-bottom: 20px;
  font-weight: 500;
}

#mood-select .d-flex {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  justify-items: center;
}

.mood-option {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #333;
  font-size: 14px;
  font-weight: 500;
  padding: 10px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s, background-color 0.3s;
}

.mood-option:hover {
  transform: scale(1.05);
}

.mood-option:nth-child(1) { background-color: #d7d6f5; }
.mood-option:nth-child(2) { background-color: #c6f2f1; }
.mood-option:nth-child(3) { background-color: #ffd3d3; }
.mood-option:nth-child(4) { background-color: #ffe4a6; }
.mood-option:nth-child(5) { background-color: #f0ccf7; }
.mood-option:nth-child(6) { background-color: #d6ebff; }
.mood-option:nth-child(7) { background-color: #fcecd4; }
.mood-option:nth-child(8) { background-color: #e2f8dc; }

.affirmation-icons i {
  cursor: pointer;
  color: #444;
  font-size: 1.1rem;
  transition: transform 0.2s;
}

.affirmation-icons i:hover {
  transform: scale(1.2);
  color: #000;
}

.hero-banner {
  position: relative;
  background: url('../images/gai.png') no-repeat center center;
  background-size: cover;
  border-radius: 20px;
  padding: 3rem 2rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.hero-banner .overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.75);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.hero-text {
  flex: 1;
  max-width: 600px;
  color: #432d92;
}

.hero-text h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.hero-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #5e5a88;
  margin-bottom: 2rem;
}

.cta-btn {
  padding: 0.8rem 1.6rem;
  background: linear-gradient(90deg, #bb68f0, #ff87b2);
  color: white;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(187, 104, 240, 0.3);
  transition: background 0.3s ease;
}

.cta-btn:hover {
  background: linear-gradient(90deg, #a25de3, #f06e9a);
}

.donate-btn i {
  margin-right: 5px;
}

.btn-purple {
  background-color: #8e44ad !important;
  color: #fff !important;
  border: none;
}
.btn-purple:hover,
.btn-purple:focus {
  background-color: #6c3483 !important; /* tím đậm hơn khi hover */
  color: #fff !important;
}
.total-donate b {
  color: #6a5acd; /* xanh tím */
  font-weight: bold;
}

@media (max-width: 768px) {
  .hero-banner {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-img {
    margin-top: 2rem;
    max-width: 80%;
  }
}
.post-card {
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.04);
  overflow: hidden;
  background-color: #fff;
}

.user-name {
  font-size: 1rem;
  font-weight: 600;
}

.post-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #333;
}

.read-more {
  color: #007bff;
  text-decoration: none;
  font-size: 0.9rem;
}

.read-more:hover {
  text-decoration: underline;
}

.post-image {
  border-radius: 10px;
  object-fit: cover;
  width: 100%;
  max-height: 350px;
}

.post-actions i {
  cursor: pointer;
  transition: color 0.2s ease;
}

.post-actions i:hover {
  color: #ff69b4;
}
.post-divider {
  border: none;
  height: 1px;
  background-color: #8f8f8f;
  margin: 0.75rem 0 1rem;
}
.bg-purple {
  background-color: #6f42c1;
}

.card h5 {
  font-weight: bold;
  color: #333;
}

.card img {
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #eee;
}

.featured-container {
  background: #fff;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  overflow-y: auto;
  max-height: 600px;
}

.featured-header {
  background-color: #4B4E8A;
  color: white;
  font-weight: bold;
  font-size: 18px;
  padding: 12px 16px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.featured-card {
  background: #fff;
  margin: 10px 16px;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

.featured-title {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 12px;
}

.featured-user {
  display: flex;
  align-items: center;
  gap: 10px;
}


.user-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px #eee;
}

.user-name {
  font-size: 14px;
  font-weight: 500;
}

.user-tag {
  font-size: 13px;
  color: #62C3AD;
}
@media (max-width: 768px) {


  .featured-container {
    max-height: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
  }

  .featured-header {
    font-size: 16px;
    padding: 10px 14px;
    border-radius: 0;
  }

  .featured-card {
    margin: 12px 14px;
    padding: 14px;
    border-radius: 12px;
  }

  .featured-title {
    font-size: 14px;
  }

  .user-img {
    width: 36px;
    height: 36px;
  }

  .user-name {
    font-size: 13px;
  }

  .user-tag {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .featured-card {
    margin: 10px;
    padding: 12px;
  }

  .featured-title {
    font-size: 13.5px;
  }

  .user-img {
    width: 32px;
    height: 32px;
  }

  .user-name {
    font-size: 12.5px;
  }

  .user-tag {
    font-size: 11.5px;
  }





/* ====== Quỹ cộng đồng Sidebar ====== */
#fund-list .progress {
  background: #ece9fa; /* tím nhạt */
}
#fund-list .progress-bar {
  background: #6a5acd !important; /* xanh tím */
  transition: width 0.6s;
}
#fund-list .donate-fund-btn {
  min-width: 92px;
  background: #6a5acd;
  color: #fff;
  border: none;
}
#fund-list .donate-fund-btn:hover {
  background: #4b3fa5;
}

/* ====== Modal Donate ====== */
#donateModal .modal-header,
#donateFundModal .modal-header {
  background: linear-gradient(90deg, #ece9fa 0%, #d3e5fa 100%);
  border-bottom: 1px solid #d3e5fa;
}
#donateModal .modal-title,
#donateFundModal .modal-title {
  color: #6a5acd;
  font-weight: 600;
}
#donateModal .btn-success,
#donateFundModal .btn-success {
  background: #6a5acd;
  border: none;
  color: #fff;
}
#donateModal .btn-success:hover,
#donateFundModal .btn-success:hover {
  background: #4b3fa5;
}
#donateModal input[type="number"],
#donateFundModal input[type="number"] {
  font-size: 1.1em;
  font-weight: 500;
}

/* ====== Toast Notification (nếu có dùng) ====== */
#toast .toast-success {
  background: #ece9fa;
  color: #4b3fa5;
  border-left: 4px solid #6a5acd;
}
#toast .toast-error {
  background: #ffeaea;
  color: #b11c1c;
  border-left: 4px solid #c82333;
}
.custom-toast {
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #333;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  padding: 0.75rem 1rem;
  min-width: 250px;
  max-width: 400px;
}
#toast {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
}


/* ====== Quỹ cộng đồng Card ====== */
#fund-list .border {
  border-color: #ece9fa !important;
}
#fund-list h6 {
  color: #4b3fa5;
  font-weight: 600;
}

/* ====== Responsive (tuỳ chỉnh cho sidebar) ====== */
@media (max-width: 991px) {
  #fund-list .d-flex {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  #fund-list .donate-fund-btn {
    width: 100%;
    margin-top: 10px !important;
    margin-left: 0 !important;
  }
}
}

/* ====== CSS cho nút filter ====== */
.feed-filters {
  display: flex;
  gap: 30px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
}

.btn-tab {
  background: none;
  border: none;
  outline: none;
  font-weight: 500;
  color: #aaa;
  padding: 8px 0;
  position: relative;
  font-size: 16px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.btn-tab.active {
  color: #222; /* màu đen đậm */
}

.btn-tab.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #6f42c1; /* tím */
  border-radius: 3px;
}
#feed-count {
  background-color: #f2f2f2;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  color: #6c757d;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  font-weight: 500;
  display: inline-block;
}
.btn-primary {
  background-color: #6f42c1 !important;
  border-color: #6f42c1 !important;
}

.btn-primary:hover {
  background-color: #5a32a3 !important;
  border-color: #5a32a3 !important;
}
/* ====== CSS ccho hover bài post ====== */
.post-card {
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background-color: #fff;
  transition: 
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.post-card:hover {
  border-color: #8f73ff; /* tím pastel đậm hơn một chút */
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); /* đổ bóng sâu hơn */
  transform: translateY(-3px); /* nâng nhẹ lên */
}

/* ====== CSS cho nút sửa hồ sơ ====== */
#editProfileBtn {
  border: 1px solid #6f42c1;
  background-color: #f8f0ff;
  color: #6f42c1;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.2s ease;
}

#editProfileBtn:hover {
  background-color: #e9d8ff;
  color: #5a32a3;
  box-shadow: 0 3px 8px rgba(111, 66, 193, 0.2);
}

/* Card header: đổi từ màu xanh sang tím */
.card-header.bg-success {
  background-color: #6f42c1 !important;
  color: white !important;
}

/* Nút "Thêm quỹ": tím viền trắng */
#addFundBtn {
  border: 1px solid #fff;
  background-color: transparent;
  color: #fff;
  font-weight: 500;
  transition: background-color 0.3s ease, color 0.3s ease;
}

#addFundBtn:hover {
  background-color: #fff;
  color: #6f42c1;
}

/* Modal: tạo quỹ */
#addFundModal .modal-header {
  background-color: #f6f0ff;
  color: #6f42c1;
  border-bottom: 1px solid #e0d4f8;
}

#addFundModal .modal-footer {
  background-color: #f6f0ff;
  border-top: 1px solid #e0d4f8;
}

/* Nút tạo quỹ: màu tím */
#addFundForm .btn-primary {
  background-color: #6f42c1;
  border-color: #6f42c1;
  transition: background-color 0.3s ease;
}

#addFundForm .btn-primary:hover {
  background-color: #5a32a3;
  border-color: #5a32a3;
}

/* Các input và textarea trong modal */
#addFundForm input,
#addFundForm textarea {
  border-radius: 6px;
  border: 1px solid #dcd2f1;
  transition: border-color 0.2s ease;
}

#addFundForm input:focus,
#addFundForm textarea:focus {
  border-color: #6f42c1;
  box-shadow: 0 0 0 0.1rem rgba(111, 66, 193, 0.25);
}

/* Modal chi tiết quỹ */
#fundDetailModal .modal-content {
  border-radius: 10px;
  border: 1px solid #e0d4f8;
}
/* ============ RESPONSIVE ============ */

/* Mobile: nhỏ hơn 576px */
@media (max-width: 575.98px) {

  /* Quỹ cộng đồng - header dàn lại */
  .community-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
  }

  #addFundBtn {
    width: 100%;
    text-align: center;
  }

  /* Fund card padding nhẹ hơn */
  .fund-card {
    padding: 12px;
    font-size: 14px;
  }

  /* Modal chi tiết quỹ nhỏ lại */
  #fundDetailModal .modal-dialog {
    margin: 1rem auto;
    max-width: 95%;
  }

  /* Featured stories - điều chỉnh */
  .featured-card {
    padding: 12px;
    margin: 10px 10px;
  }

  .featured-title {
    font-size: 13px;
  }

  .user-name {
    font-size: 13px;
  }

  .user-tag {
    font-size: 12px;
  }

  /* Hộp hỗ trợ - padding nhỏ lại */
  .support-card {
    padding: 12px;
  }

  .support-card h6 {
    font-size: 14px;
  }

  .support-card p {
    font-size: 13px;
  }

  .support-card .btn {
    font-size: 13px;
  }
}

/* Tablet: 576px - 767px */
@media (min-width: 576px) and (max-width: 767.98px) {
  .featured-card {
    margin: 10px 12px;
    padding: 14px;
  }

  .support-card {
    padding: 14px;
  }

  .fund-card {
    padding: 14px;
  }
}

/* Desktop nhỏ: 768px - 991px */
@media (min-width: 768px) and (max-width: 991.98px) {
  #addFundBtn {
    font-size: 13px;
    padding: 4px 10px;
  }
}
.featured-card {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  background-color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
}

.featured-card:hover {
  border-color: #da6aff; /* màu viền nổi bật */
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2); /* ánh sáng xanh lam */
  transform: translateY(-2px); /* hơi nhấc lên */
}

#featureStoryModal .modal-dialog {
  max-width: 950px;
  width: 95vw;
}
#featureStoryModal .modal-content {
  border-radius: 15px;
  overflow: hidden;
}
