/* Firebase Banner, Comments, Server Report, and Admin Panel Styling */

/* Announcement Banner */
.announcement-banner-wrapper {
  position: relative;
  z-index: 100;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-banner {
  background: rgba(18, 22, 36, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.18), 0 10px 30px rgba(0, 0, 0, 0.45);
  animation: bannerSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

@keyframes bannerSlideIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

.admin-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.admin-banner.type-important {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.18) 0%, rgba(20, 22, 34, 0.75) 100%);
}
.admin-banner.type-important::before { background: var(--accent); }

.admin-banner.type-warning {
  border-color: rgba(245, 197, 24, 0.4);
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.15) 0%, rgba(20, 22, 34, 0.75) 100%);
}
.admin-banner.type-warning::before { background: var(--gold); }

.admin-banner.type-update {
  border-color: rgba(59, 130, 246, 0.4);
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.18) 0%, rgba(20, 22, 34, 0.75) 100%);
}
.admin-banner.type-update::before { background: #3b82f6; }

.admin-banner.type-info {
  border-color: rgba(16, 185, 129, 0.4);
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.16) 0%, rgba(20, 22, 34, 0.75) 100%);
}
.admin-banner.type-info::before { background: #10b981; }

.banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.banner-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.type-important .banner-icon-badge { background: rgba(229, 9, 20, 0.25); color: #ff4d5a; border-color: rgba(229, 9, 20, 0.4); }
.type-warning .banner-icon-badge { background: rgba(245, 197, 24, 0.22); color: #ffd13b; border-color: rgba(245, 197, 24, 0.4); }
.type-update .banner-icon-badge { background: rgba(59, 130, 246, 0.22); color: #60a5fa; border-color: rgba(59, 130, 246, 0.4); }
.type-info .banner-icon-badge { background: rgba(16, 185, 129, 0.22); color: #34d399; border-color: rgba(16, 185, 129, 0.4); }

.banner-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.banner-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.banner-author-tag {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.banner-date {
  font-size: 11px;
  color: var(--muted);
}

.banner-text {
  font-size: 13.5px;
  line-height: 1.45;
  color: #f1f3f9;
  font-family: 'Barlow', sans-serif;
  word-break: break-word;
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.banner-btn-delete {
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.35);
  color: #ff5260;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.banner-btn-delete:hover {
  background: rgba(229, 9, 20, 0.3);
  color: #fff;
  transform: scale(1.05);
}

/* Discussion & Comments Section */
.discussion-section {
  margin-top: 32px;
  background: rgba(14, 17, 27, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  padding: 18px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.discussion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.discussion-title {
  font-size: 15px;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}

.discussion-count {
  font-size: 11px;
  font-weight: 800;
  background: rgba(229, 9, 20, 0.18);
  color: #ff4d5a;
  border: 1px solid rgba(229, 9, 20, 0.3);
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 20px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.02);
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.comment-inputs-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.comment-input-name {
  flex: 1;
  min-width: 160px;
  height: 38px;
  background: rgba(10, 12, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  font-size: 13px;
  font-family: 'Barlow', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-input-name:focus {
  border-color: rgba(229, 9, 20, 0.55);
  background: rgba(16, 20, 30, 0.9);
  box-shadow: 0 0 0 1px rgba(229, 9, 20, 0.2);
}

.comment-input-rating {
  width: auto;
  min-width: 160px;
  height: 38px;
  background: rgba(10, 12, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 600;
  font-family: 'Barlow', sans-serif;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-input-rating:focus {
  border-color: rgba(245, 197, 24, 0.6);
  box-shadow: 0 0 0 1px rgba(245, 197, 24, 0.2);
}

.comment-textarea {
  width: 100%;
  min-height: 70px;
  max-height: 200px;
  background: rgba(10, 12, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
  font-family: 'Barlow', sans-serif;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-textarea:focus {
  border-color: rgba(59, 130, 246, 0.55);
  background: rgba(16, 20, 30, 0.9);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2);
}

.btn-submit-comment {
  align-self: flex-end;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 3px 12px rgba(59, 130, 246, 0.35);
  transition: all 0.2s;
}
.btn-submit-comment:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.5);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 11px 14px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  transition: background 0.2s, border-color 0.2s;
}
.comment-item:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.09);
}

.comment-avatar {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.comment-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.comment-author-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.comment-author-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  font-family: 'Barlow', sans-serif;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-rating-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
}

.comment-time {
  font-size: 11px;
  color: var(--muted);
}

.comment-text-content {
  font-size: 13px;
  line-height: 1.5;
  color: #cfd4e2;
  font-family: 'Barlow', sans-serif;
  word-break: break-word;
}

.comment-delete-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}
.comment-delete-btn:hover {
  color: var(--red);
}

/* Comment Action Bar: Likes, Reply, Count */
.comment-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 4px;
  flex-wrap: wrap;
}

.comment-action-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 3px 9px;
  color: #94a3b8;
  font-size: 11.5px;
  font-family: 'Barlow', sans-serif;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}
.comment-action-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.16);
}

.comment-like-btn.liked {
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
}
.comment-like-btn.liked i {
  color: #60a5fa;
  transform: scale(1.1);
}

.comment-reply-btn:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.08);
}

.replies-count-tag {
  font-size: 11px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 2px;
}

/* Threaded replies indentation */
.comment-replies-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid rgba(255, 255, 255, 0.08);
}

.comment-item.is-reply {
  background: rgba(255, 255, 255, 0.018);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 7px;
  padding: 8px 11px;
}
.comment-item.is-reply:hover {
  background: rgba(255, 255, 255, 0.035);
}

.comment-avatar.is-reply {
  width: 28px;
  height: 28px;
  min-width: 28px;
  font-size: 12px;
}

.reply-to-tag {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 4px;
  padding: 1px 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Inline Reply Box */
.comment-inline-reply-container {
  width: 100%;
}
.comment-inline-reply-box {
  margin-top: 8px;
  background: rgba(10, 13, 20, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeInReply 0.2s ease;
}
@keyframes fadeInReply {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: translateY(0); }
}
.reply-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #94a3b8;
  font-family: 'Barlow', sans-serif;
}
.reply-box-header strong {
  color: #38bdf8;
}
.btn-cancel-reply {
  background: transparent;
  border: none;
  color: #ef4444;
  font-size: 11px;
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-cancel-reply:hover {
  text-decoration: underline;
}
.reply-inputs-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reply-name-input {
  flex: 1;
  min-width: 130px;
  height: 32px;
  font-size: 12px;
}
.reply-textarea {
  min-height: 52px;
  height: 52px;
  font-size: 12.5px;
  padding: 7px 10px;
}
.reply-actions-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
.btn-submit-reply {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
.btn-submit-reply:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
}

/* Spoiler tags & interactive blur */
.comment-form-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.comment-spoiler-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-family: 'Barlow', sans-serif;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
}
.comment-spoiler-toggle input[type="checkbox"] {
  accent-color: #e50914;
  cursor: pointer;
  width: 14px;
  height: 14px;
}
.comment-spoiler-toggle:hover {
  color: #e2e8f0;
}
.comment-spoiler-box {
  margin: 5px 0;
  background: rgba(245, 158, 11, 0.05);
  border: 1px dashed rgba(245, 158, 11, 0.3);
  border-radius: 6px;
  padding: 7px 10px;
}
.comment-spoiler-header {
  font-size: 11px;
  font-weight: 700;
  color: #f59e0b;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-family: 'Barlow', sans-serif;
}
.comment-spoiler-text.blurred {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  opacity: 0.55;
  transition: filter 0.25s ease, opacity 0.25s ease;
}
.comment-spoiler-text.revealed {
  filter: none;
  user-select: text;
  pointer-events: auto;
  opacity: 1;
}
.btn-toggle-spoiler {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Barlow', sans-serif;
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}
.btn-toggle-spoiler:hover {
  background: rgba(245, 158, 11, 0.25);
  color: #fff;
}

.comments-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--muted);
  font-size: 13.5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.comments-empty i {
  font-size: 28px;
  color: var(--muted);
  opacity: 0.6;
}

/* Report Modal & Button */
.btn-report-server {
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.35);
  color: var(--gold);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Barlow', sans-serif;
  transition: all 0.2s;
}
.btn-report-server:hover {
  background: rgba(245, 197, 24, 0.25);
  transform: translateY(-1px);
}

/* Admin Drawer / Modal */
.admin-badge-trigger {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.admin-form-box {
  background: rgba(15, 18, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-form-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-select {
  height: 42px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0 12px;
  color: #fff;
  font-size: 13.5px;
  font-family: 'Barlow', sans-serif;
  outline: none;
}

.reports-list-wrap {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.report-item-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.report-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.report-item-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}
.report-item-text {
  font-size: 12px;
  color: #cbd2e1;
  margin-top: 4px;
}

/* ==========================================================================
   USER GROUP CHAT STYLES (Real-Time Community Discussion Room)
   ========================================================================== */

/* Floating Group Chat Button */
.floating-group-btn {
  position: fixed;
  right: 18px;
  bottom: 84px;
  height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-family: 'Barlow', sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  z-index: 995;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.floating-group-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.6);
  color: #ffffff;
}
.floating-group-btn:active {
  transform: scale(0.96);
}
.floating-group-btn i {
  font-size: 15px;
}
.group-chat-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
  animation: groupPulse 2s infinite ease-in-out;
}
@keyframes groupPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Home Page Group Invite Card */
.group-invite-banner {
  margin: 0 0 24px 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.16) 0%, rgba(18, 22, 38, 0.82) 100%);
  border: 1px solid rgba(59, 130, 246, 0.32);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.group-invite-banner:hover {
  border-color: rgba(59, 130, 246, 0.65);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.22);
}
.group-invite-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.group-invite-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.24);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.group-invite-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.group-live-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.group-live-badge i {
  font-size: 7px;
  animation: groupPulse 1.5s infinite;
}
.group-invite-desc {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}
.btn-join-group {
  padding: 8px 16px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-join-group:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

/* Group Page Main Layout - Dedicated Viewport-Fit Chat Container */
#groupPage {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  width: 100dvw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100vh !important;
  max-height: 100dvh !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #0b141a !important;
  z-index: 10000 !important;
  overflow: hidden !important;
  display: none !important;
}

#groupPage.active {
  display: flex !important;
  flex-direction: column !important;
}

/* Hide Bottom Nav & Top Headers when in full-screen WhatsApp chat */
body.group-page-active .bottom-nav,
body.group-page-active .floating-group-btn,
body:has(#groupPage.active) .bottom-nav,
body:has(#groupPage.active) .floating-group-btn,
#groupPage.active ~ .bottom-nav,
#groupPage.active ~ .floating-group-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.group-page-active .top-header-desktop,
body.group-page-active .top-header-mobile,
body:has(#groupPage.active) .top-header-desktop,
body:has(#groupPage.active) .top-header-mobile {
  display: none !important;
}

.group-page-container {
  width: 100%;
  height: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 0 !important;
  overflow: hidden;
  position: relative;
  background: #0b141a;
}

/* Chat Header - WhatsApp Clean Style */
.group-chat-header {
  flex-shrink: 0;
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: #202c33;
  border: none;
  border-bottom: 1px solid rgba(134, 150, 160, 0.15);
  border-radius: 0;
  margin: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.group-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.btn-chat-back {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #aebac1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.btn-chat-back:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e9edef;
}
.group-avatar-stack {
  position: relative;
  flex-shrink: 0;
}
.group-avatar-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2563eb;
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.group-title-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.group-room-title {
  font-size: 15.5px;
  font-weight: 700;
  color: #e9edef;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-room-status {
  font-size: 11.5px;
  color: #8696a0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #00a884;
  box-shadow: 0 0 6px #00a884;
  display: inline-block;
  flex-shrink: 0;
  animation: groupPulse 1.8s infinite;
}
.group-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.btn-group-nick {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 18px;
  background: #2a3942;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e9edef;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-group-nick:hover {
  background: #37464f;
  color: #ffffff;
}

/* Pinned Guideline Bar - WhatsApp Flush Notice */
.group-pinned-banner {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 0;
  background: #182229;
  border: none;
  border-bottom: 1px solid rgba(134, 150, 160, 0.12);
  color: #ffd13b;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.group-pinned-banner i {
  font-size: 13px;
  flex-shrink: 0;
}

/* Chat Messages Timeline Body - Full Width & WhatsApp Clean Wallpaper */
.group-chat-body {
  flex: 1 1 0%;
  min-height: 0 !important;
  height: 100%;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-y !important;
  overscroll-behavior-y: contain !important;
  overscroll-behavior: contain !important;
  padding: 14px 20px;
  background-color: #0b141a !important;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(18, 27, 34, 0.8) 0%, rgba(11, 20, 26, 0.98) 100%),
    radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px) !important;
  background-size: 100% 100%, 24px 24px !important;
  border: none !important;
  border-radius: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 4px;
  scroll-behavior: auto !important;
  position: relative;
  user-select: text;
}

/* Custom Scrollbar for Group Chat Feed */
.group-chat-body::-webkit-scrollbar {
  width: 6px;
}
.group-chat-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}
.group-chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.group-chat-body::-webkit-scrollbar-thumb:hover {
  background: #00a884;
}

/* Mouse Dragging State for Chat */
.group-chat-body.is-chat-dragging {
  cursor: grabbing !important;
  user-select: none !important;
}
.group-chat-body.is-chat-dragging * {
  user-select: none !important;
}

/* Floating Scroll to Bottom Button */
.btn-scroll-chat-bottom {
  position: absolute;
  right: 20px;
  bottom: 110px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #202c33;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #00a884;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 60;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 14px;
}
.btn-scroll-chat-bottom:hover {
  transform: scale(1.1);
  background: #00a884;
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 168, 132, 0.45);
}
.btn-scroll-chat-bottom:active {
  transform: scale(0.95);
}

/* WhatsApp Date Separator */
.chat-date-divider {
  text-align: center;
  position: relative;
  margin: 12px 0 8px;
  user-select: none;
}
.chat-date-divider span {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(24, 34, 41, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-size: 11px;
  color: #8696a0;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* WhatsApp Message Item Row */
.chat-msg-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
  position: relative;
  overflow: visible;
}

/* Other users (Left aligned) */
.chat-msg-row.is-other {
  justify-content: flex-start;
  align-self: flex-start;
}
/* My message (Right aligned) */
.chat-msg-row.is-me {
  justify-content: flex-end;
  align-self: flex-end;
}

/* Participant Avatar (Incoming) */
.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.chat-bubble-wrap {
  position: relative;
  max-width: min(85%, 480px);
  display: flex;
  flex-direction: column;
  overflow: visible;
}

/* WhatsApp Speech Bubbles - Clean, Authentic WhatsApp Dark Theme */
.chat-bubble-wa {
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  word-break: break-word;
  min-width: 75px;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
  padding: 6px 9px 8px 9px;
  border-radius: 8px;
  border: none !important;
  box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.25);
  transition: filter 0.15s ease;
}

.chat-bubble-wa .chat-text {
  color: #e9edef;
  font-size: 14px;
  line-height: 1.42;
}

/* WhatsApp Incoming Bubble (Left - Other users) */
.chat-bubble-wa.chat-bubble-other {
  background: #202c33 !important;
  background-color: #202c33 !important;
  color: #e9edef;
  border-top-left-radius: 2px;
  margin-left: 2px;
  margin-right: auto;
}

/* WhatsApp Outgoing Bubble (Right - Me) */
.chat-bubble-wa.chat-bubble-me {
  background: #005c4b !important;
  background-color: #005c4b !important;
  color: #e9edef;
  border-top-right-radius: 2px;
  margin-right: 2px;
  margin-left: auto;
}

/* Admin Message Styling */
.chat-bubble-wa.chat-bubble-admin {
  border-left: 3.5px solid #fbbf24 !important;
}

.wa-bubble-sender {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.2px;
  font-weight: 600;
  margin-bottom: 2px;
  line-height: 1.2;
}
.wa-sender-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.wa-admin-pill {
  font-size: 9px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 1px 4px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.wa-pinned-pill {
  font-size: 9px;
  color: #fbbf24;
}
.wa-pinned-pill-me {
  font-size: 9px;
  font-weight: 700;
  color: #fde68a;
  margin-bottom: 2px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* WhatsApp Timestamp & Meta */
.wa-bubble-meta {
  float: right;
  margin-left: 8px;
  margin-top: 1px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  color: #8696a0;
  user-select: none;
  line-height: 1;
  vertical-align: bottom;
}
.chat-bubble-me .wa-bubble-meta {
  color: rgba(233, 237, 239, 0.65);
}
.wa-double-tick i {
  color: #53bdeb;
  font-size: 9.5px;
}

/* WhatsApp Bubble Hover Action Trigger */
.wa-action-trigger {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #cbd5e1;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
  z-index: 10;
}
.chat-bubble-wa:hover .wa-action-trigger,
.chat-bubble-wa:focus-within .wa-action-trigger {
  display: flex;
}
.wa-action-trigger:hover {
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
}

/* WhatsApp Dropdown Menu */
.wa-action-menu {
  position: absolute;
  top: 26px;
  right: 4px;
  background: #233138;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
  padding: 4px 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: 145px;
}
.wa-action-menu button {
  background: none;
  border: none;
  color: #d1d7db;
  padding: 8px 14px;
  text-align: left;
  font-size: 12.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s;
  font-family: inherit;
}
.wa-action-menu button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}
.wa-action-menu .wa-menu-delete {
  color: #ff6b72;
}
.wa-action-menu .wa-menu-delete:hover {
  background: rgba(229, 9, 20, 0.2);
  color: #ff858a;
}

/* WhatsApp Quoted Reply Box inside Bubble */
.wa-reply-box {
  background: rgba(0, 0, 0, 0.24);
  border-left: 3.5px solid #00a884;
  border-radius: 5px;
  padding: 4px 8px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: background 0.15s;
}
.chat-bubble-me .wa-reply-box {
  background: rgba(0, 0, 0, 0.18);
}
.wa-reply-box:hover {
  background: rgba(0, 0, 0, 0.35);
}

/* Floating WhatsApp Reaction Badge */
.chat-wa-reaction-badge {
  position: absolute;
  bottom: -8px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #202c33;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 1.5px 6px;
  font-size: 11px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  z-index: 5;
  user-select: none;
  transition: transform 0.15s ease;
}
.chat-msg-row.is-me .chat-wa-reaction-badge {
  right: 10px;
  background: #084337;
}
.chat-msg-row.is-other .chat-wa-reaction-badge {
  left: 10px;
}
.chat-wa-reaction-badge:hover {
  transform: scale(1.08);
}
.wa-badge-emoji {
  font-size: 12px;
}
.wa-badge-count {
  font-size: 10.5px;
  font-weight: 700;
  color: #cbd5e1;
}

.chat-msg-avatar.is-admin-avatar {
  border: 2px solid #f59e0b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
  position: relative;
}

.avatar-admin-crown {
  position: absolute;
  top: -6px;
  right: -5px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  color: #78350f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  border: 1px solid #1a1c2e;
}

.chat-admin-badge-special {
  font-size: 9.5px;
  font-weight: 800;
  background: linear-gradient(135deg, #f59e0b 0%, #dc2626 100%);
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.composer-admin-badge {
  font-size: 10.5px;
  font-weight: 700;
  color: #ffd13b;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  cursor: pointer;
}

.composer-admin-badge:hover {
  background: rgba(229, 9, 20, 0.22);
  border-color: rgba(229, 9, 20, 0.45);
  color: #ff4d5a;
}

.btn-group-admin-auth {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-group-admin-auth:hover,
.btn-group-admin-auth.is-admin-active {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.5);
  color: #ffd13b;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.btn-group-admin-exit {
  height: 32px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(229, 9, 20, 0.18);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #ff4d5a;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s;
}

.btn-group-admin-exit:hover {
  background: rgba(229, 9, 20, 0.35);
  border-color: #ff4d5a;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(229, 9, 20, 0.35);
}

.badge-admin-mini {
  font-size: 9.5px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1a1c2e;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

/* Chat message text & link formatting */
.chat-text {
  white-space: pre-wrap;
}
.chat-text a {
  color: #60a5fa;
  text-decoration: underline;
  word-break: break-all;
}
.chat-msg-row.is-me .chat-text a {
  color: #ffd13b;
}

/* Delete button on message */
.chat-msg-delete-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ff767c;
  cursor: pointer;
  font-size: 11px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  opacity: 0.8;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  flex-shrink: 0;
}
.chat-msg-delete-btn:hover,
.chat-msg-delete-btn:active {
  opacity: 1;
  color: #ffffff;
  background: #e50914;
  border-color: #e50914;
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.45);
}
.chat-msg-delete-btn.is-admin-delete {
  background: rgba(229, 9, 20, 0.22);
  border-color: rgba(229, 9, 20, 0.45);
  color: #ff4d5a;
  opacity: 0.95;
}

/* Quick Emoji Chips Bar - WhatsApp Clean Bar */
.chat-quick-emojis {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 6px 14px;
  margin: 0;
  background: #202c33;
  border-top: 1px solid rgba(134, 150, 160, 0.12);
  flex-shrink: 0;
}
.chat-quick-emojis::-webkit-scrollbar {
  display: none;
}
.emoji-chip {
  padding: 5px 12px;
  border-radius: 16px;
  background: #2a3942;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #d1d7db;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  flex-shrink: 0;
}
.emoji-chip:hover {
  background: #37464f;
  color: #ffffff;
}
.emoji-chip:active {
  transform: scale(0.95);
}

/* Chat Composer Area - WhatsApp Fullscreen Bottom Bar */
.group-chat-composer {
  background: #202c33 !important;
  border: none !important;
  border-top: 1px solid rgba(134, 150, 160, 0.22) !important;
  border-radius: 0 !important;
  padding: 8px 14px calc(10px + env(safe-area-inset-bottom, 0px)) !important;
  margin: 0 !important;
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.35) !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 100 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.composer-sender-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11.5px;
}
.composer-user-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #8696a0;
  cursor: pointer;
}
.composer-user-tag:hover {
  color: #00a884;
}
.composer-user-tag strong {
  color: #e9edef;
}
.composer-char-count {
  font-size: 10.5px;
  color: #8696a0;
}

.composer-form {
  display: flex !important;
  align-items: flex-end !important;
  gap: 8px !important;
  width: 100% !important;
  position: relative !important;
}

.group-chat-input {
  flex: 1 !important;
  background: #2a3942 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 22px !important;
  padding: 10px 16px !important;
  color: #e9edef !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  outline: none !important;
  resize: none !important;
  max-height: 120px !important;
  min-height: 42px !important;
  box-sizing: border-box !important;
  transition: background 0.15s, border-color 0.15s !important;
  display: block !important;
}
.group-chat-input:focus {
  background: #324047 !important;
  border-color: #00a884 !important;
}
.group-chat-input::placeholder {
  color: #8696a0 !important;
}

.btn-send-group-msg {
  height: 42px !important;
  width: 42px !important;
  min-width: 42px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: #00a884 !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 16px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 168, 132, 0.45) !important;
  transition: transform 0.15s ease, background-color 0.15s ease !important;
}
.btn-send-group-msg .send-btn-label {
  display: none !important;
}
.btn-send-group-msg i {
  margin-left: 2px !important;
}
.btn-send-group-msg:hover {
  transform: scale(1.08) !important;
  background: #02b690 !important;
}
.btn-send-group-msg:active {
  transform: scale(0.95) !important;
}
.btn-send-group-msg:disabled {
  opacity: 0.4 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* Avatar Color Picker inside Modal */
.avatar-color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.avatar-color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.avatar-color-dot:hover {
  transform: scale(1.15);
}
.avatar-color-dot.active {
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  transform: scale(1.15);
}

/* Mobile Responsiveness for Group Chat */
@media (max-width: 640px) {
  #groupPage {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 10000 !important;
    overflow: hidden !important;
  }
  .group-page-container {
    height: 100% !important;
    max-height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  .floating-group-btn {
    bottom: 78px;
    right: 14px;
    height: 40px;
    padding: 0 13px;
    font-size: 11.5px;
  }
  .group-chat-header {
    padding: 8px 12px;
    border-radius: 0;
    margin-bottom: 0;
    border: none;
    border-bottom: 1px solid rgba(134, 150, 160, 0.15);
  }
  .group-header-left {
    gap: 8px;
  }
  .btn-chat-back {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }
  .group-avatar-icon {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  .group-room-title {
    font-size: 14px;
  }
  .group-room-status {
    font-size: 10.5px;
  }
  .btn-group-nick {
    padding: 4px 8px;
    font-size: 11px;
  }
  .btn-group-nick span {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .group-pinned-banner {
    padding: 6px 12px;
    font-size: 11px;
    margin: 0;
    border-radius: 0;
  }
  .group-chat-body {
    min-height: 0 !important;
    max-height: none !important;
    padding: 10px 10px;
    gap: 4px;
    border-radius: 0 !important;
    border: none !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    overscroll-behavior-y: contain !important;
  }
  .btn-scroll-chat-bottom {
    right: 12px;
    bottom: 96px;
    width: 36px;
    height: 36px;
    font-size: 13px;
  }
  .chat-msg-row {
    max-width: 90%;
  }
  .chat-quick-emojis {
    padding: 5px 8px;
    gap: 5px;
    margin: 0;
  }
  .emoji-chip {
    padding: 4px 9px;
    font-size: 11px;
  }
  .group-chat-composer {
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 0 !important;
    margin: 0 !important;
    border-top: 1px solid rgba(134, 150, 160, 0.22) !important;
    background: #202c33 !important;
    position: relative !important;
    z-index: 100 !important;
    display: block !important;
  }
  .group-chat-input {
    padding: 8px 14px !important;
    font-size: 13.5px !important;
    min-height: 40px !important;
  }
  .btn-send-group-msg .send-btn-label {
    display: none !important;
  }
  .btn-send-group-msg {
    height: 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    padding: 0 !important;
    font-size: 15px !important;
  }
  .bottom-nav {
    padding: 0 4px;
  }
  .nav-btn {
    font-size: 9px;
    letter-spacing: 0;
  }
  .nav-btn i {
    font-size: 16px;
  }
}

/* ======================================================
   GROUP CHAT PAGE & CALLOUT STYLING
   ====================================================== */

/* Home Page Community Chat Callout Banner */
.community-chat-callout {
  margin: 16px 0 24px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.16) 0%, rgba(20, 24, 40, 0.85) 60%, rgba(30, 20, 40, 0.75) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(229, 9, 20, 0.38);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.18);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.community-chat-callout:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 9, 20, 0.7);
  box-shadow: 0 14px 40px rgba(229, 9, 20, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.25);
}
.community-chat-callout::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 4px; bottom: 0;
  background: var(--accent);
}
.chat-callout-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.chat-callout-icon-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.35) 0%, rgba(185, 28, 28, 0.55) 100%);
  border: 1px solid rgba(229, 9, 20, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.35);
}
.chat-callout-pulse {
  position: absolute;
  top: -2px; right: -2px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0f121d;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #10b981; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.chat-callout-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.chat-callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
}
.chat-live-badge {
  font-size: 10px;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-live-badge i { font-size: 6px; }
.chat-callout-sub {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.4;
}
.btn-chat-enter {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}
.community-chat-callout:hover .btn-chat-enter {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.5);
  transform: translateX(3px);
}

/* Floating Group Chat Button */
.floating-group-chat-btn {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 998;
  height: 44px;
  padding: 0 16px 0 12px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.95) 0%, rgba(185, 28, 28, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(229, 9, 20, 0.45), 0 0 12px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Barlow', sans-serif;
}
.floating-group-chat-btn:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow: 0 12px 30px rgba(229, 9, 20, 0.6);
}
.floating-group-chat-btn:active {
  transform: scale(0.96);
}
.floating-chat-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  position: relative;
}
.floating-chat-live-pulse {
  position: absolute;
  top: -2px; right: -2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}
.floating-chat-text {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.floating-chat-badge {
  background: #fff;
  color: #e50914;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Bottom Nav Chat Badge */
.nav-icon-badge-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-chat-dot {
  position: absolute;
  top: -2px;
  right: -6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #0f121d;
  box-shadow: 0 0 8px #10b981;
  animation: pulseDot 2s infinite;
}

/* Group Chat Page Container */
#groupchatPage {
  padding-bottom: 90px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Chat Header Bar */
.chat-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(16, 18, 30, 0.85);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  margin-bottom: 14px;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}
.chat-back-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.chat-back-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.05);
}
.chat-header-avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.3) 0%, rgba(185, 28, 28, 0.5) 100%);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  position: relative;
  flex-shrink: 0;
}
.chat-header-online-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #0f121d;
  box-shadow: 0 0 8px #10b981;
}
.chat-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-header-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-header-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.2px;
}
.chat-badge-live {
  font-size: 9.5px;
  font-weight: 800;
  color: #34d399;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 1px 7px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-badge-live i { font-size: 5px; }
.chat-header-meta {
  font-size: 11.5px;
  color: var(--muted);
}
.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-pill-user-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  font-family: 'Barlow', sans-serif;
}
.chat-pill-user-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
}
.chat-pill-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.chat-pill-name {
  font-weight: 700;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-icon-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.chat-icon-action-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

/* Pinned Topic Notice */
.chat-pinned-banner {
  background: rgba(245, 197, 24, 0.08);
  border: 1px solid rgba(245, 197, 24, 0.28);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #f1f3f9;
  line-height: 1.45;
}
.pinned-banner-icon {
  color: var(--gold);
  font-size: 14px;
  flex-shrink: 0;
}
.pinned-banner-body {
  flex: 1;
}
.pinned-banner-close {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.pinned-banner-close:hover {
  color: #fff;
}

/* Quick Topic & Chips */
.chat-quick-chips-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.chat-quick-chips-wrapper::-webkit-scrollbar {
  display: none;
}
.chat-quick-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.chat-quick-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}
.chat-chip {
  padding: 5px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
  font-family: 'Barlow', sans-serif;
}
.chat-chip:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: translateY(-1px);
}

/* Messages Stream Area */
.chat-messages-container {
  flex: 1;
  min-height: 380px;
  max-height: calc(100vh - 350px);
  position: relative;
  background: rgba(13, 16, 26, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.chat-messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}
.chat-messages-list::-webkit-scrollbar {
  width: 6px;
}
.chat-messages-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 3px;
}

/* Loading & Empty state */
.chat-loading-state, .chat-empty-state {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.chat-empty-state i {
  font-size: 36px;
  color: var(--muted);
  opacity: 0.5;
}
.chat-empty-hint {
  font-size: 12px;
  color: #94a3b8;
  max-width: 260px;
}

/* Message Bubble Quoted Reply Snippet */
.chat-bubble-reply-quote {
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 6px;
  font-size: 11px;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-bubble-reply-quote strong {
  color: #fff;
}

/* Message Actions Buttons (Reply, Delete) */
.chat-bubble-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.chat-msg-row:hover .chat-bubble-actions {
  opacity: 1;
}
.chat-action-text-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 4px;
  border-radius: 4px;
  transition: all 0.2s;
}
.chat-action-text-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.chat-action-text-btn.is-delete:hover {
  color: #ff4d5a;
  background: rgba(229, 9, 20, 0.15);
}

/* Scroll to Bottom Button */
.chat-scroll-bottom-btn {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 22, 38, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(229, 9, 20, 0.5);
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  transition: all 0.2s;
  z-index: 10;
}
.chat-scroll-bottom-btn:hover {
  background: var(--accent);
  transform: translateX(-50%) translateY(-2px);
}

/* Quoted Reply Indicator Bar */
.chat-reply-bar {
  background: rgba(22, 26, 42, 0.95);
  border: 1px solid rgba(229, 9, 20, 0.4);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  gap: 10px;
}
.chat-reply-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  overflow: hidden;
}
.chat-reply-text-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}
.chat-reply-to-user {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}
.chat-reply-snippet {
  font-size: 12px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-reply-cancel-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}
.chat-reply-cancel-btn:hover {
  color: #ff4d5a;
}

/* Input Area Wrapper */
.chat-input-wrapper {
  background: rgba(16, 18, 30, 0.88);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 12px 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.chat-emoji-quickbar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.chat-emoji-quickbar::-webkit-scrollbar {
  display: none;
}
.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}
.chat-input-box {
  flex: 1;
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 8px 12px;
  transition: all 0.2s;
}
.chat-input-box:focus-within {
  border-color: rgba(229, 9, 20, 0.65);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 0 14px rgba(229, 9, 20, 0.25);
}
.chat-text-input {
  width: 100%;
  background: none;
  border: none;
  color: #ffffff;
  font-family: 'Barlow', sans-serif;
  font-size: 13.5px;
  line-height: 1.4;
  outline: none;
  resize: none;
  max-height: 100px;
  min-height: 24px;
}
.chat-text-input::placeholder {
  color: var(--muted);
}
.chat-char-counter {
  font-size: 10px;
  color: var(--muted);
  text-align: right;
  margin-top: 2px;
}
.chat-send-btn {
  height: 44px;
  width: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0%, #b91c1c 100%);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(229, 9, 20, 0.55);
}
.chat-send-btn:active {
  transform: scale(0.95);
}
.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
.chat-sender-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  padding: 0 4px;
}
.chat-sender-as strong {
  color: #f1f3f9;
}
.chat-btn-switch-name {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.chat-btn-switch-name:hover {
  text-decoration: underline;
}

/* Avatar Colors inside Profile Modal */
.chat-avatar-color-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.chat-color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.chat-color-dot:hover {
  transform: scale(1.15);
}
.chat-color-dot.active {
  border-color: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
  transform: scale(1.15);
}

@media (max-width: 640px) {
  .floating-group-chat-btn {
    bottom: 80px;
    right: 14px;
    height: 40px;
    padding: 0 12px;
  }
  .floating-chat-text {
    display: none;
  }
  .chat-header-bar {
    padding: 10px 12px;
    border-radius: 14px;
  }
  .chat-messages-container {
    min-height: 340px;
    max-height: calc(100vh - 360px);
  }
  .community-chat-callout {
    padding: 12px 14px;
  }
  .chat-callout-sub {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .btn-chat-enter span {
    display: none;
  }
  .btn-chat-enter {
    padding: 8px 10px;
  }
}

/* ==========================================================================
   ENHANCED COMMUNITY GROUP CHAT FEATURES (REPLY, SPOILER, SHARE MEDIA, PIN, REACTIONS)
   ========================================================================== */

/* Action buttons in message header */
.chat-msg-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted2);
  cursor: pointer;
  font-size: 11px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  opacity: 0.8;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  flex-shrink: 0;
}
.chat-msg-action-btn:hover {
  opacity: 1;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}
.chat-msg-reply-btn:hover {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.15);
}
.chat-msg-pin-btn.is-pinned {
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(251, 191, 36, 0.2);
  opacity: 1;
}

/* Pinned Tag on message */
.chat-msg-pinned-tag {
  font-size: 9.5px;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.3px;
}

/* Dynamic Pinned Banner at Chat Top */
.group-pinned-banner {
  background: linear-gradient(90deg, rgba(229, 9, 20, 0.18), rgba(30, 41, 59, 0.65));
  border: 1px solid rgba(229, 9, 20, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #f1f5f9;
}
.pinned-banner-content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.pinned-banner-texts {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}
.pinned-banner-badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.5px;
  background: #e50914;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.pinned-banner-msg {
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}
.btn-pinned-action {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 13px;
  transition: all 0.2s;
}
.btn-pinned-action:hover {
  color: #ff4d5a;
  background: rgba(229, 9, 20, 0.2);
}

/* Quoted Reply inside Chat Bubble */
.chat-bubble-reply {
  background: rgba(0, 0, 0, 0.28);
  border-left: 3px solid #38bdf8;
  padding: 5px 9px;
  border-radius: 4px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.chat-bubble-reply:hover {
  background: rgba(0, 0, 0, 0.42);
}
.reply-author {
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.reply-text {
  font-size: 11.5px;
  color: #cbd5e1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}

/* Shared Media Card inside Chat Bubble */
.chat-shared-media-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 7px 10px;
  margin-top: 8px;
  max-width: 340px;
}
.chat-media-poster {
  width: 44px;
  height: 64px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  background: #1e293b;
}
.chat-media-info {
  flex: 1;
  min-width: 0;
}
.chat-media-title {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}
.chat-media-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--muted2);
  margin-bottom: 6px;
}
.chat-media-rating {
  color: #fbbf24;
  font-weight: 700;
}
.chat-media-type-badge {
  font-size: 9px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  padding: 1px 5px;
  border-radius: 3px;
  color: #cbd5e1;
}
.chat-media-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 5px;
  background: linear-gradient(135deg, #e50914, #b81d24);
  color: #ffffff;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.chat-media-play-btn:hover {
  background: #ff1f2d;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(229, 9, 20, 0.5);
}

/* Spoiler Warning & Text */
.chat-spoiler-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.35);
  color: #facc15;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 6px;
}
.chat-spoiler-wrap {
  position: relative;
}
.chat-spoiler-text {
  filter: blur(6px);
  -webkit-filter: blur(6px);
  transition: filter 0.2s ease;
  user-select: none;
  cursor: pointer;
}
.chat-bubble.spoiler-revealed .chat-spoiler-text,
.chat-bubble-wa.spoiler-revealed .chat-spoiler-text,
.chat-msg-row.spoiler-revealed .chat-spoiler-text,
.spoiler-revealed .chat-spoiler-text {
  filter: none !important;
  -webkit-filter: none !important;
  user-select: text !important;
  cursor: text !important;
}
.btn-reveal-spoiler {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  background: rgba(234, 179, 8, 0.25);
  border: 1px solid rgba(234, 179, 8, 0.45);
  color: #fef08a;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  z-index: 10;
}
.btn-reveal-spoiler:hover {
  background: rgba(234, 179, 8, 0.4);
  color: #ffffff;
  transform: translateY(-1px);
}
.chat-bubble.spoiler-revealed .btn-reveal-spoiler,
.chat-bubble-wa.spoiler-revealed .btn-reveal-spoiler,
.chat-msg-row.spoiler-revealed .btn-reveal-spoiler,
.spoiler-revealed .btn-reveal-spoiler {
  display: none !important;
}

/* Reactions Row */
.chat-reactions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  position: relative;
}
.reaction-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 2px 7px;
  border-radius: 12px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}
.reaction-pill:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}
.reaction-pill.active {
  background: rgba(229, 9, 20, 0.25);
  border-color: rgba(229, 9, 20, 0.55);
  color: #ffffff;
}
.reaction-count {
  font-weight: 700;
  font-size: 10.5px;
}
.reaction-add-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted2);
  width: 24px;
  height: 22px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
}
.reaction-add-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}
.reaction-picker-popover {
  position: absolute;
  bottom: 28px;
  left: 0;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 4px 8px;
  display: flex;
  gap: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 50;
  animation: popoverFadeIn 0.18s ease-out;
}
@keyframes popoverFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.reaction-popover-item {
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
  transition: transform 0.15s;
}
.reaction-popover-item:hover {
  transform: scale(1.3);
}

/* Composer Enhancements */
.composer-reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 6px 12px;
  margin-bottom: 8px;
}
.reply-bar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #38bdf8;
  font-size: 12px;
  min-width: 0;
}
.reply-bar-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.reply-bar-user {
  font-weight: 700;
  font-size: 11px;
}
.reply-bar-text {
  color: #cbd5e1;
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 400px;
}
.btn-cancel-reply {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 4px;
}
.btn-cancel-reply:hover {
  color: #ff4d5a;
}

.composer-share-media-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(229, 9, 20, 0.12);
  border: 1px solid rgba(229, 9, 20, 0.35);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 8px;
}
.share-media-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.share-media-thumb {
  width: 28px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}
.share-media-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.share-media-badge {
  font-size: 9.5px;
  font-weight: 800;
  color: #ff4d5a;
}
.share-media-title {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 350px;
}
.btn-cancel-share-media {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
}
.btn-cancel-share-media:hover {
  color: #ff4d5a;
}

/* Spoiler Toggle Button in Composer */
.btn-composer-spoiler {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted2);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}
.btn-composer-spoiler:hover {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border-color: rgba(234, 179, 8, 0.3);
}
.btn-composer-spoiler.is-active {
  background: rgba(234, 179, 8, 0.25);
  color: #facc15;
  border-color: #facc15;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.3);
}
.emoji-chip-special {
  background: rgba(229, 9, 20, 0.15) !important;
  border-color: rgba(229, 9, 20, 0.35) !important;
  color: #ff767c !important;
  font-weight: 700 !important;
}
.emoji-chip-special:hover {
  background: rgba(229, 9, 20, 0.3) !important;
  color: #ffffff !important;
}

/* Highlight flash animation when scrolling to referenced message */
.chat-msg-row.highlight-flash {
  animation: highlightMessagePulse 1.8s ease;
}
@keyframes highlightMessagePulse {
  0% { background: rgba(56, 189, 248, 0.35); border-radius: 12px; }
  50% { background: rgba(56, 189, 248, 0.2); border-radius: 12px; }
  100% { background: transparent; }
}


