/**
 * Activity Feed Unified Stylesheet
 * File: css/activity-feed.css
 *
 * Centralizes all styles for:
 * 1. Activity Feed Layout & Containers
 * 2. Modern Glassmorphic Post Cards
 * 3. Icon-only Circular Activity Type Badges
 * 4. Rich Media Cards (Library, Waifu, Challenge, Wishlist, Achievement, Trade, Gift, Video, Diffs)
 * 5. Modern Social Composer & BBCode Editor
 * 6. Top Bar Controls (Preset Pills, Filters Modal, Sort Dropdown)
 * 7. Comments System & Thread Responses
 * 8. User @Mentions Autocomplete & Chips
 * 9. Single Activity View (.sa-*)
 * 10. Responsive Breakpoints
 */

/* ==========================================================================
   1. LAYOUT & CONTAINERS
   ========================================================================== */

.latest-activities-container {
  max-width: 1100px;
  margin: 0;
  padding: 0 10px;
  box-sizing: border-box;
}

.activity-feed-section {
  position: relative;
  width: 100%;
}

.activity-feed-section h2 {
  color: #76769b;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 5px;
  font-weight: 800;
}

.no-activities {
  text-align: center;
  color: #76769b;
  padding: 40px 20px;
  font-size: 14px;
}

/* ==========================================================================
   2. MODERN COMPOSER (POST & COMMENTS)
   ========================================================================== */

.modern-composer {
  background: rgba(30, 30, 41, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--moe-border-divs, #2d2d3e);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

.modern-composer:focus-within {
  border-color: rgba(102, 54, 219, 0.45);
  box-shadow: 0 6px 24px rgba(102, 54, 219, 0.15);
}

.af-composer-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.af-composer-avatar-wrap {
  flex-shrink: 0;
  padding-top: 2px;
}

.af-composer-avatar {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block;
}

.af-composer-avatar-ph {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  background: #2a2a3a;
  border: 1px solid #3a3a4e;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #c4a8ff;
  font-weight: 800;
  font-size: 14px;
}

.af-composer-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.af-composer-textarea {
  width: 100% !important;
  min-height: 64px !important;
  background: rgba(20, 20, 28, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
  color: #f0f0f5 !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  font-family: inherit !important;
  resize: vertical !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
}

.af-composer-textarea:focus {
  background: rgba(18, 18, 26, 0.8) !important;
  border-color: rgba(102, 54, 219, 0.5) !important;
  box-shadow: 0 0 14px rgba(102, 54, 219, 0.2) !important;
}

.af-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.af-composer-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.af-composer-toolbar .af-toolbar-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #8e8ea8;
  font-size: 12px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.af-composer-toolbar .af-toolbar-btn:hover {
  background: rgba(102, 54, 219, 0.2);
  border-color: rgba(102, 54, 219, 0.4);
  color: #fff;
  transform: translateY(-1px);
}

.btn-publish-modern {
  background: linear-gradient(135deg, #6636db, #8257e5);
  color: #fff;
  border: none;
  padding: 7px 20px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 2px 10px rgba(102, 54, 219, 0.35);
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-publish-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(102, 54, 219, 0.5);
}

.af-composer-error {
  color: #ff6b6b;
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 8px;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 6px;
  border: 1px solid rgba(255, 107, 107, 0.2);
}

/* Fallback & BBCode Editor Controls */
.activity-form {
  margin-bottom: 16px;
}

.activity-form textarea {
  width: 100%;
  min-height: 80px;
  max-height: 300px;
  background: #1e1e29;
  border: 1px solid #2d2d3e;
  border-radius: 8px;
  box-sizing: border-box;
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  padding: 10px 12px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.activity-form textarea:focus {
  border-color: #6636db;
  box-shadow: 0 0 0 2px rgba(102, 54, 219, 0.25);
  outline: none;
}

.activity-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.btn-publish {
  background: #6636db;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 800;
  transition: background 0.3s ease;
}

.btn-publish:hover {
  background: #5a2fc9;
}

.af-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  background: #1a1a26;
  border: 1px solid #2d2d3e;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 8px 10px;
}

.af-toolbar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  background: #2d2d3e;
  border: 1px solid #3a3a4e;
  border-radius: 5px;
  color: #c0c0d0;
  cursor: pointer;
  font-size: 11px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.af-toolbar-btn:hover,
.af-toolbar-btn--active {
  background: #6636db;
  border-color: #6636db;
  color: #fff;
}

.af-toolbar-sep {
  width: 1px;
  height: 22px;
  margin: 0 3px;
  flex-shrink: 0;
  background: #2d2d3e;
}

.af-toolbar-sep--right,
.la-toolbar-sep--right {
  flex: 1;
  width: auto;
  background: none;
}

.af-preview-section {
  background: #181824;
  border: 1px solid #2d2d3e;
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-top: -1px;
  padding: 12px 14px 14px;
}

.af-preview-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #6636db;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.af-preview-body {
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.7;
  word-wrap: break-word;
  min-height: 40px;
}

.af-preview-placeholder {
  color: #4a4a6a;
  font-style: italic;
  text-align: center;
  padding: 20px 0;
  margin: 0;
}

/* ==========================================================================
   3. TOP BAR CONTROLS (PILLS, FILTERS MODAL, SORT DROPDOWN)
   ========================================================================== */

.af-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 14px 0;
  padding: 0 4px;
}

.af-preset-nav {
  display: inline-flex;
  gap: 4px;
  background: rgba(30, 30, 41, 0.5);
  padding: 5px;
  border-radius: 20px;
  border: 1px solid var(--moe-border-divs, #2d2d3e);
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}

.af-preset-nav::-webkit-scrollbar {
  display: none;
}

.af-preset-nav .lib-tab-btn {
  background: transparent;
  color: #76769b;
  border: none;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 15px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  font-family: inherit;
}

.af-preset-nav .lib-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.af-preset-nav .lib-tab-btn.active {
  background: #6636db;
  color: #fff;
  box-shadow: 0 2px 8px rgba(102, 54, 219, 0.35);
}

.af-controls-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}

.af-filter-btn {
  background: #1e1e29;
  color: #eee;
  border: 1px solid #2d2d3e;
  border-radius: 20px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 6px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.af-filter-btn:hover {
  border-color: #6636db;
  color: #fff;
}

.af-filter-badge {
  background: #6636db;
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
}

.af-filter-modal-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 999;
  background: rgba(30, 30, 41, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--moe-border-divs, #2d2d3e);
  border-radius: 14px;
  padding: 14px;
  min-width: 320px;
  max-width: 480px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #aaa;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.filter-option-label:hover {
  background: rgba(55, 55, 79, 0.45) !important;
}

.filter-option-label:has(input:checked) {
  background: #2a1f4e !important;
  color: #eee !important;
  border: 1px solid #6636db;
}

.apply-filter-btn {
  background: #6636db;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s ease;
}

.apply-filter-btn:hover {
  background: #5a2fc9;
}

.reset-filter-btn {
  background: transparent;
  color: #76769b;
  border: 1px solid #2d2d3e;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-filter-btn:hover {
  border-color: #6636db;
  color: #eee;
}

/* Custom Switch in Controls */
.custom-switch-wrapper {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}

.custom-switch-wrapper input {
  opacity: 0;
  width: 0;
  height: 0;
}

.custom-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #2d2d3e;
  transition: .3s;
  border-radius: 18px;
}

.custom-switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.custom-switch-wrapper input:checked + .custom-switch-slider {
  background-color: #6636db;
}

.custom-switch-wrapper input:checked + .custom-switch-slider:before {
  transform: translateX(14px);
}

.af-sort-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.af-sort-wrap i {
  position: absolute;
  right: 14px;
  pointer-events: none;
  color: #76769b;
  font-size: 12px;
}

.af-sort-select {
  background: #1e1e29;
  color: #eee;
  border: 1px solid #2d2d3e;
  padding: 0 14px;
  padding-right: 32px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  cursor: pointer;
  outline: none;
  line-height: 2.3em;
  height: 31px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  font-family: inherit;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.af-sort-select:hover,
.af-sort-select:focus {
  border-color: #6636db;
  color: #fff;
}

.sort-option:hover {
  background: rgba(55, 55, 79, 0.45) !important;
}

.sort-option.active {
  color: #9b72f5 !important;
}

/* ==========================================================================
   4. MODERN GLASSMORPHIC POST CARDS
   ========================================================================== */

.activity-post {
  background: rgba(30, 30, 41, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--moe-border-divs, #2d2d3e);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 12px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.activity-post:hover {
  border-color: var(--moe-border-divs-hover, #3a3a52);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.activity-post.pinned-activity {
  border-color: #6636db !important;
  box-shadow: 0 0 16px rgba(102, 54, 219, 0.2), 0 4px 16px rgba(0, 0, 0, 0.25) !important;
  background: linear-gradient(180deg, rgba(102, 54, 219, 0.08) 0%, rgba(30, 30, 41, 0.75) 100%) !important;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.activity-author {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.activity-avatar-link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  flex-shrink: 0 !important;
  position: relative;
  text-decoration: none;
  overflow: visible;
  box-sizing: border-box !important;
}

.activity-author-avatar {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s ease;
  box-sizing: border-box !important;
}

.activity-avatar-link:hover .activity-author-avatar {
  transform: scale(1.05);
}

.activity-author-avatar-placeholder {
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;
  max-width: 42px !important;
  max-height: 42px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  background: #2a2a3a;
  border: 1px solid #3a3a4e;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #c4a8ff;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.activity-author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.activity-author-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.2;
}

.activity-author-link {
  color: #6636db;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.activity-author-link:hover {
  color: #a78cff;
}

.activity-author-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1;
}

.activity-time,
.pinned-indicator,
.cross-profile-text {
  display: inline-flex;
  align-items: center;
  height: 22px;
  line-height: 20px;
  box-sizing: border-box;
  font-size: 11px;
  font-weight: 700;
  border-radius: 20px;
  white-space: nowrap;
}

.activity-time {
  background: rgba(255, 255, 255, 0.06);
  color: #8e8ea8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0 9px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.activity-time:hover {
  color: #eee;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.pinned-indicator {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  background: rgba(102, 54, 219, 0.2) !important;
  color: #c4a8ff !important;
  border: 1px solid rgba(102, 54, 219, 0.4) !important;
  font-size: 11px;
  line-height: 1;
  flex-shrink: 0 !important;
  cursor: default;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pinned-indicator:hover {
  transform: scale(1.12);
  background: rgba(102, 54, 219, 0.3) !important;
}

.cross-profile-text {
  background: rgba(118, 118, 155, 0.2);
  color: #c0c0d8;
  border: 1px solid rgba(118, 118, 155, 0.3);
  padding: 0 9px;
}

/* ==========================================================================
   5. ICON-ONLY CIRCULAR ACTIVITY TYPE BADGE
   ========================================================================== */

.activity-type-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  font-size: 11px;
  line-height: 1;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  flex-shrink: 0 !important;
  cursor: default;
  text-shadow: none;
}

.activity-type-badge:hover {
  transform: scale(1.12);
  opacity: 0.95;
}

.activity-type-badge.achievement_earned {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #f87171 !important;
  border-color: rgba(239, 68, 68, 0.35) !important;
}

.activity-type-badge.anime_added,
.activity-type-badge.favorite_anime_added,
.activity-type-badge.library_anime_added,
.activity-type-badge.library_anime_status,
.activity-type-badge.library_anime_review {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #38bdf8 !important;
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.activity-type-badge.game_added,
.activity-type-badge.favorite_game_added,
.activity-type-badge.library_game_added,
.activity-type-badge.library_game_status,
.activity-type-badge.library_game_review {
  background: rgba(99, 102, 241, 0.15) !important;
  color: #818cf8 !important;
  border-color: rgba(99, 102, 241, 0.35) !important;
}

.activity-type-badge.manga_added,
.activity-type-badge.favorite_manga_added,
.activity-type-badge.library_manga_added,
.activity-type-badge.library_manga_status,
.activity-type-badge.library_manga_review {
  background: rgba(192, 132, 252, 0.15) !important;
  color: #c084fc !important;
  border-color: rgba(192, 132, 252, 0.35) !important;
}

.activity-type-badge.favorite_movie_added,
.activity-type-badge.library_movie_added,
.activity-type-badge.library_movie_status,
.activity-type-badge.library_movie_review {
  background: rgba(249, 115, 22, 0.15) !important;
  color: #fb923c !important;
  border-color: rgba(249, 115, 22, 0.35) !important;
}

.activity-type-badge.waifu_selected {
  background: rgba(244, 114, 182, 0.15) !important;
  color: #f472b6 !important;
  border-color: rgba(244, 114, 182, 0.35) !important;
}

.activity-type-badge.trade_completed {
  background: rgba(168, 85, 247, 0.15) !important;
  color: #c084fc !important;
  border-color: rgba(168, 85, 247, 0.35) !important;
}

.activity-type-badge.daily_challenge_completed {
  background: rgba(251, 146, 60, 0.16) !important;
  color: #fdba74 !important;
  border-color: rgba(251, 146, 60, 0.4) !important;
}

.activity-type-badge.character_claimed {
  background: rgba(250, 204, 21, 0.15) !important;
  color: #fde047 !important;
  border-color: rgba(250, 204, 21, 0.35) !important;
}

.activity-type-badge.wishlist_added {
  background: rgba(234, 179, 8, 0.15) !important;
  color: #facc15 !important;
  border-color: rgba(234, 179, 8, 0.35) !important;
}

.activity-type-badge.avatar_updated,
.activity-type-badge.banner_updated {
  background: rgba(45, 212, 191, 0.15) !important;
  color: #2dd4bf !important;
  border-color: rgba(45, 212, 191, 0.35) !important;
}

.activity-type-badge.bio_updated,
.activity-type-badge.social_updated,
.activity-type-badge.display_name_updated {
  background: rgba(74, 222, 128, 0.15) !important;
  color: #4ade80 !important;
  border-color: rgba(74, 222, 128, 0.35) !important;
}

.activity-type-badge.post {
  background: rgba(102, 54, 219, 0.18) !important;
  color: #c4a8ff !important;
  border-color: rgba(102, 54, 219, 0.4) !important;
}

.activity-type-badge.video_request {
  background: rgba(244, 63, 94, 0.15) !important;
  color: #fb7185 !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
}

.activity-type-badge.grouped-badge {
  width: auto !important;
  min-width: 24px !important;
  max-width: none !important;
  height: 22px !important;
  aspect-ratio: auto !important;
  border-radius: 20px !important;
  padding: 0 7px 0 6px !important;
  gap: 4px !important;
  background: linear-gradient(135deg, rgba(102, 54, 219, 0.3), rgba(61, 43, 110, 0.5)) !important;
  color: #d8b4fe !important;
  border: 1px solid rgba(168, 85, 247, 0.45) !important;
  font-weight: 800;
  font-size: 11px;
}

.grouped-badge-count {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1;
}

/* Header Action Buttons */
.activity-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.act-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8e8ea8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  padding: 0;
}

.act-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #eee;
  transform: translateY(-1px);
}

.act-btn-pin.is-active {
  background: #6636db !important;
  color: #fff !important;
  border-color: #7c4dff !important;
}

.act-btn-pin:hover {
  color: #c4a8ff;
  border-color: rgba(102, 54, 219, 0.5);
}

.act-btn-share:hover {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.4);
}

.act-btn-delete:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.act-btn-cross:hover {
  color: #c4a8ff;
  border-color: rgba(102, 54, 219, 0.4);
}

/* ==========================================================================
   6. ACTIVITY CONTENT & BBCODE ELEMENTS
   ========================================================================== */

.activity-content {
  color: #e2e2ec;
  line-height: 1.6;
  word-wrap: break-word;
  margin: 12px 0 10px 0;
  font-size: 14px;
}

.activity-content .af-heading,
.af-preview-body .af-heading,
.sa-content .af-heading {
  font-size: 16px;
  font-weight: 800;
  color: #eee;
  margin: 12px 0 6px;
  padding-bottom: 4px;
  border-bottom: 2px solid #6636db;
}

.activity-content .af-quote,
.af-preview-body .af-quote,
.sa-content .af-quote {
  border-left: 3px solid #6636db;
  background: #1a1a26;
  margin: 10px 0;
  padding: 8px 14px;
  border-radius: 0 6px 6px 0;
  color: #aaa;
  font-style: italic;
  font-size: 12px;
  font-family: "Rawline", sans-serif;
}

.activity-content .af-spoiler,
.af-preview-body .af-spoiler,
.sa-content .af-spoiler {
  background: #2d2d3e;
  color: transparent;
  border-radius: 4px;
  padding: 1px 4px;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s, background 0.2s;
  position: relative;
}

.activity-content .af-spoiler::after,
.af-preview-body .af-spoiler::after,
.sa-content .af-spoiler::after {
  content: "👁 Спойлер";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #76769b;
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  pointer-events: none;
}

.activity-content .af-spoiler--revealed,
.af-preview-body .af-spoiler--revealed,
.sa-content .af-spoiler--revealed {
  color: #e0e0e0;
  background: #2d2d3e;
}

.activity-content .af-spoiler--revealed::after,
.af-preview-body .af-spoiler--revealed::after,
.sa-content .af-spoiler--revealed::after {
  display: none;
}

.activity-content .af-list,
.af-preview-body .af-list,
.sa-content .af-list {
  padding-left: 22px;
  margin: 8px 0;
  color: #e0e0e0;
}

.activity-content .af-list li,
.af-preview-body .af-list li,
.sa-content .af-list li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.activity-content .af-post-image,
.af-preview-body .af-post-image,
.sa-content .af-post-image {
  max-width: 50%;
  height: auto;
  border-radius: 8px;
  margin: 10px 0;
  display: block;
}

.activity-content .af-youtube-embed,
.af-preview-body .af-youtube-embed,
.sa-content .af-youtube-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  margin: 10px 0;
}

.activity-content .af-youtube-embed iframe,
.af-preview-body .af-youtube-embed iframe,
.sa-content .af-youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.activity-content a,
.af-preview-body a,
.sa-content a {
  color: #9b72f5;
  text-decoration: none;
}

.activity-content a:hover,
.af-preview-body a:hover,
.sa-content a:hover {
  text-decoration: underline;
}

/* @Mentions inside posts and comments */
.af-mention {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(102, 54, 219, 0.15);
  border: 1px solid rgba(102, 54, 219, 0.35);
  border-radius: 20px;
  padding: 1px 8px 1px 3px;
  text-decoration: none !important;
  color: #9b72f5 !important;
  font-weight: 700;
  font-size: 0.9em;
  vertical-align: middle;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  margin-top: -7px;
}

.af-mention:hover {
  background: rgba(102, 54, 219, 0.28);
  border-color: rgba(102, 54, 219, 0.6);
  text-decoration: none !important;
}

.af-mention-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.af-mention-avatar-ph,
.af-mention-opt-avatar-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #3a3a55;
  color: #c4a8ff;
  font-weight: 800;
  font-size: 10px;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.af-mention-name {
  line-height: 1;
}

/* @Mention Autocomplete Dropdown */
.af-mention-dropdown {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 99999;
  background: rgba(26, 26, 38, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid #36364d;
  border-radius: 12px;
  min-width: 240px;
  max-width: 340px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(102, 54, 219, 0.25);
  overflow: hidden;
  padding: 6px;
  box-sizing: border-box;
  animation: afMentionFadeIn 0.15s ease-out;
}

@keyframes afMentionFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.af-mention-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.af-mention-list::-webkit-scrollbar {
  width: 5px;
}

.af-mention-list::-webkit-scrollbar-thumb {
  background: #3a3a55;
  border-radius: 10px;
}

.af-mention-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
}

.af-mention-option:hover,
.af-mention-option--active {
  background: rgba(102, 54, 219, 0.22);
}

.af-mention-option--active {
  box-shadow: inset 3px 0 0 #6636db;
}

.af-mention-opt-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.af-mention-opt-avatar-ph {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2f2f45, #1e1e2d);
  border: 1px solid #434360;
  color: #c4a8ff;
  font-weight: 800;
  flex-shrink: 0;
}

.af-mention-opt-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.af-mention-opt-name {
  font-weight: 700;
  font-size: 13px;
  color: #f0f0f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.af-mention-opt-login {
  font-size: 11px;
  color: #76769b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.af-mention-loading,
.af-mention-empty {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 600;
  user-select: none;
}

.af-mention-loading {
  color: #c4a8ff;
}

.af-mention-loading i {
  color: #a27bff;
  font-size: 14px;
}

.af-mention-empty {
  color: #76769b;
}

.af-mention-empty i {
  color: #555577;
  font-size: 13px;
}

.af-mention-footer {
  padding: 5px 8px 3px;
  margin-top: 4px;
  border-top: 1px solid #28283a;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #5d5d80;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  user-select: none;
}

.af-picker-emote-img:hover {
  transform: scale(1.2);
}

/* ==========================================================================
   7. RICH MEDIA CARDS
   ========================================================================== */

/* Media Card (Anime, Game, Manga, Movie) */
.activity-media-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(20, 20, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.activity-media-card:hover {
  background: rgba(25, 25, 36, 0.7);
  border-color: rgba(102, 54, 219, 0.3);
}

.activity-media-poster-link {
  display: block;
  width: 62px;
  height: 86px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  text-decoration: none;
}

.activity-media-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.activity-media-poster-link:hover .activity-media-poster {
  transform: scale(1.06);
}

.activity-media-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.activity-media-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.activity-media-tag.fav-tag { color: #fbbf24; }
.activity-media-tag.anime-tag { color: #48d1cc; }
.activity-media-tag.game-tag { color: #5aa9ff; }
.activity-media-tag.manga-tag { color: #ce93d8; }
.activity-media-tag.movie-tag { color: #ff9142; }
.activity-media-tag.waifu-tag { color: #ff80bf; }
.activity-media-tag.challenge-tag { color: #ff9f43; }
.activity-media-tag.claim-tag { color: #facc15; }
.activity-media-tag.wishlist-tag { color: #fb923c; }
.activity-media-tag.profile-tag { color: #2dd4bf; }
.activity-media-tag.default-tag { color: #c4a8ff; }
.activity-media-tag.is-review-tag { text-decoration: none; transition: opacity 0.2s; }
.activity-media-tag.is-review-tag:hover { opacity: 0.8; }

.activity-media-title {
  font-weight: 800;
  font-size: 15px;
  line-height: 1.3;
  color: #fff;
}

.activity-media-title a {
  color: #fff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.activity-media-title a:hover {
  color: #a78cff;
}

.activity-media-native {
  color: #8e8ea8;
  font-size: 13px;
  line-height: 1.2;
}

.activity-media-subtitle {
  color: #76769b;
  font-size: 12px;
  line-height: 1.3;
}

.activity-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: #9d9db5;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
  margin-top: 2px;
}

.activity-status-transition {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.activity-status-pill {
  border-radius: 20px;
  border: 1px solid;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}

.status-arrow {
  color: #76769b;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
}

.activity-review-quote {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid #6636db;
  border-radius: 0 8px 8px 0;
  padding: 6px 12px;
  color: #c8c8db;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 2px;
}

/* Card Gift Block Component */
.activity-gift-card-block {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(26, 26, 38, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 6px;
}

.activity-gift-poster-wrap {
  flex-shrink: 0;
}

.activity-gift-poster-wrap .trade-card-poster {
  width: 58px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease;
}

.activity-gift-poster-wrap:hover .trade-card-poster {
  transform: scale(1.04);
}

.activity-gift-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

.activity-gift-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  width: fit-content;
}

.activity-gift-badge.badge-gift-sent {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.activity-gift-badge.badge-gift-recv {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.activity-gift-character-name a {
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
}

.activity-gift-character-name a:hover {
  color: #c4a8ff;
}

.activity-gift-counterparty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  margin-top: 2px;
}

.gift-counterparty-prefix {
  color: #76769b;
  font-weight: 600;
}

.gift-counterparty-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #c4a8ff;
  font-weight: 700;
  padding: 2px 8px 2px 4px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.gift-counterparty-link:hover {
  background: rgba(102, 54, 219, 0.2);
  border-color: rgba(102, 54, 219, 0.4);
  color: #fff;
}

.gift-counterparty-link .trade-partner-avatar,
.gift-counterparty-link .trade-partner-avatar-ph {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* Achievement Card */
.activity-achievement-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(20, 20, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
}

.activity-achievement-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.activity-achievement-section-tag {
  font-size: 10px;
  font-weight: 800;
  color: #a78cff;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.activity-achievement-title {
  font-weight: 800;
  font-size: 15px;
  color: #eee;
}

.activity-achievement-desc {
  color: #76769b;
  font-size: 13px;
  line-height: 1.35;
}

/* Trade Exchange */
.activity-trade-exchange {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(20, 20, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px;
  flex-wrap: wrap;
}

.activity-trade-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.activity-trade-chip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #8e8ea8;
}

.activity-trade-chip.chip-recv {
  color: #4ade80;
}

.activity-trade-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px;
}

.trade-card-poster-link {
  width: 44px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
}

.trade-card-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trade-card-name {
  font-weight: 700;
  font-size: 13px;
  color: #eee;
  line-height: 1.25;
}

.trade-card-name a {
  color: #eee;
  text-decoration: none;
  transition: color 0.2s;
}

.trade-card-name a:hover {
  color: #a78cff;
}

.activity-trade-divider {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(102, 54, 219, 0.2);
  border: 1px solid rgba(102, 54, 219, 0.4);
  color: #c4a8ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
  margin: 0 auto;
}

.activity-trade-partner {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: #76769b;
}

.trade-partner-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #a78cff;
  text-decoration: none;
  font-weight: 700;
}

.trade-partner-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.trade-partner-avatar-ph {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #333;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Video Card */
.activity-video-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(20, 20, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px;
}

.activity-video-thumb-link {
  width: 140px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  display: block;
}

.activity-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.activity-video-play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
}

.activity-video-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  min-width: 0;
}

.activity-video-title {
  font-weight: 800;
  font-size: 14px;
  color: #eee;
  line-height: 1.3;
}

.activity-video-title a {
  color: #eee;
  text-decoration: none;
}

.activity-video-channel {
  color: #76769b;
  font-size: 12px;
  font-weight: 700;
}

.activity-video-comment {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: #aaa;
  margin-top: 4px;
}

/* Profile Update Cards (Avatar, Banner, Bio, Social, Display Name) */
.activity-profile-card {
  background: rgba(20, 20, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.activity-profile-card:hover {
  background: rgba(25, 25, 36, 0.75);
  border-color: rgba(45, 212, 191, 0.28);
}

.activity-profile-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

/* Avatar Update */
.activity-profile-avatar-body {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(135deg, #2dd4bf, #06b6d4, #6366f1);
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.25);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar-preview-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.activity-profile-meta-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-card-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #f1f1f6;
  line-height: 1.3;
}

.profile-card-sub {
  font-size: 12px;
  color: #76769b;
  font-weight: 600;
}

/* Banner Update */
.profile-banner-frame {
  width: 100%;
  max-width: 580px;
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  margin-bottom: 10px;
  background: #14141c;
}

.profile-banner-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.profile-banner-frame:hover .profile-banner-preview-img {
  transform: scale(1.02);
}

/* Diff Block (Bio) */
.activity-diff-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-diff-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 8px;
  padding: 9px 12px;
  border-left: 3px solid transparent;
}

.activity-diff-item.diff-new {
  background: rgba(34, 197, 94, 0.08);
  border-left-color: #22c55e;
}

.activity-diff-item.diff-old {
  background: rgba(148, 163, 184, 0.06);
  border-left-color: #64748b;
}

.activity-diff-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
}

.diff-new .activity-diff-label { color: #4ade80; }
.diff-old .activity-diff-label { color: #94a3b8; }

.activity-diff-text {
  font-size: 13.5px;
  line-height: 1.5;
}

.diff-new .activity-diff-text { color: #f1f1f6; }
.diff-old .activity-diff-text { color: #8e8ea8; }

/* Socials Grid */
.activity-social-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.activity-social-chip {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.activity-social-chip:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

.social-chip-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.social-tg .social-chip-icon { background: rgba(0, 136, 204, 0.15); color: #29b6f6; }
.social-dc .social-chip-icon { background: rgba(88, 101, 242, 0.15); color: #818cf8; }
.social-tw .social-chip-icon { background: rgba(145, 70, 255, 0.15); color: #c084fc; }
.social-yt .social-chip-icon { background: rgba(255, 0, 0, 0.15); color: #f87171; }
.social-web .social-chip-icon { background: rgba(45, 212, 191, 0.15); color: #2dd4bf; }
.social-al .social-chip-icon { background: rgba(2, 169, 255, 0.15); color: #38bdf8; }

.social-chip-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.social-chip-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #76769b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.social-chip-val {
  font-size: 13px;
  font-weight: 700;
  color: #f1f1f6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Display Name Transition */
.activity-name-transition {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 4px 0;
}

.name-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 800;
}

.name-old {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  text-decoration: line-through;
}

.name-arrow {
  color: #76769b;
  font-size: 12px;
  display: flex;
  align-items: center;
}

.name-new {
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #2dd4bf;
  box-shadow: 0 2px 10px rgba(45, 212, 191, 0.15);
}

/* Grouped Activity Card */
.activity-grouped-card {
  background: rgba(20, 20, 28, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.activity-grouped-card:hover {
  background: rgba(25, 25, 36, 0.7);
  border-color: rgba(102, 54, 219, 0.3);
}

.activity-grouped-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
	line-height: 1;
}

.activity-grouped-count-badge {
  font-size: 11px;
  font-weight: 800;
  color: #a78cff;
  background: rgba(102, 54, 219, 0.15);
  border: 1px solid rgba(102, 54, 219, 0.35);
  padding: 2px 9px;
  border-radius: 12px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.activity-grouped-card .grouped-activity-grid {
  margin-top: 0;
}

.activity-grouped-card .sa-group-grid {
  margin-bottom: 0;
}

/* Media Preview (Avatar / Banner updates fallback) */
.activity-media-preview-wrap {
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: inline-block;
  max-width: 100%;
}

.activity-media-preview-img {
  max-width: 320px;
  max-height: 220px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* Grouped Activity Grid */
.grouped-activity-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.gag-thumb {
  display: block;
  width: 56px;
  height: 78px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.gag-thumb:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 18px rgba(102, 54, 219, 0.45);
}

.gag-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gag-thumb-empty {
  background: #2a2a3a;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid #3a3a52;
}

.gag-extra {
  width: 56px;
  height: 78px;
  border-radius: 8px;
  background: rgba(102, 54, 219, 0.15);
  border: 1px solid rgba(102, 54, 219, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c4a8ff;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

/* ==========================================================================
   8. BOTTOM ACTIONS & COMMENTS SYSTEM
   ========================================================================== */

.activity-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-comments-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #2d2d3e;
  border: none;
  border-radius: 10px;
  padding: 4px 13px 5px 10px;
  color: #eeeeee;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  line-height: 1.2;
  box-sizing: border-box;
  font-family: inherit;
}

.toggle-comments-btn i {
  color: #76769b;
  font-size: 18px;
  transition: color 0.2s ease;
}

.toggle-comments-btn .comment-count {
  font-size: 18px;
  font-weight: 800;
  color: #eeeeee;
  line-height: 1;
}

.toggle-comments-btn:hover {
  transform: scale(1.05);
  background: #36364a;
}

.toggle-comments-btn:hover i {
  color: #a78cff;
}

.my-like-btn {
  transition: transform 0.2s ease, background 0.2s ease !important;
}

.my-like-btn:hover {
  transform: scale(1.05);
  background: #36364a !important;
}

.activity-comments-section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  margin-top: 12px;
}

.activity-comment,
.sa-activity-comment {
  background: rgba(28, 28, 38, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.activity-comment:hover,
.sa-activity-comment:hover {
  border-color: rgba(102, 54, 219, 0.3);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-avatar {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  display: block;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.comment-avatar-placeholder {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  background: #2a2a3a;
  border: 1px solid #3a3a4e;
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #c4a8ff;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.comment-author-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.25;
}

.comment-author-name {
  color: #c4a8ff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13.5px;
  transition: color 0.15s ease;
}

.comment-author-name:hover {
  color: #d8b4fe;
}

.comment-time {
  color: #76769b;
  font-size: 11px;
  line-height: 1;
}

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

.delete-comment-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 50% !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #76769b !important;
  font-size: 11px;
  padding: 0 !important;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.delete-comment-btn:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
  color: #ef4444 !important;
  transform: translateY(-1px);
}

.like-comment-btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  cursor: pointer;
  height: 26px;
  padding: 0 10px !important;
  border-radius: 20px !important;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #76769b !important;
  font-size: 11.5px;
  font-weight: 700;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.like-comment-btn i {
  color: #76769b;
  font-size: 11.5px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.like-comment-btn:hover {
  background: rgba(255, 71, 87, 0.12) !important;
  border-color: rgba(255, 71, 87, 0.3) !important;
  color: #ff4757 !important;
  transform: translateY(-1px);
}

.like-comment-btn:hover i {
  color: #ff4757 !important;
}

.like-comment-btn.liked {
  color: #ff4757 !important;
  background: rgba(255, 71, 87, 0.14) !important;
  border-color: rgba(255, 71, 87, 0.35) !important;
}

.like-comment-btn.liked i {
  color: #ff4757 !important;
}

.comment-like-count {
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
}

.reply-comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #8e8ea8 !important;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  height: 24px;
  padding: 0 10px !important;
  border-radius: 20px !important;
  margin-top: 8px;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.reply-comment-btn:hover {
  color: #c4a8ff !important;
  background: rgba(102, 54, 219, 0.15) !important;
  border-color: rgba(102, 54, 219, 0.35) !important;
  transform: translateY(-1px);
}

.comment-content {
  margin-top: 8px;
  color: #e2e8f0;
  line-height: 1.5;
  font-size: 13.5px;
  word-break: break-word;
}

.comment-input-section {
  margin-bottom: 15px;
  position: relative;
}

.comment-input-section.modern-composer {
  background: rgba(24, 24, 34, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px;
  box-sizing: border-box;
}

.comment-input-section.modern-composer .comment-input {
  width: 100%;
  min-height: 56px;
  background: rgba(16, 16, 24, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px !important;
  color: #fff;
  padding: 10px 12px;
  box-sizing: border-box;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.comment-input-section.modern-composer .comment-input:focus {
  border-color: rgba(102, 54, 219, 0.5) !important;
  box-shadow: 0 0 12px rgba(102, 54, 219, 0.2) !important;
  background: rgba(18, 18, 28, 0.9) !important;
}

.comment-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.comment-composer-footer .comment-toolbar {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.comment-composer-footer .comment-toolbar .af-toolbar-btn {
  width: 26px;
  height: 26px;
  font-size: 11px;
}

.btn-post-comment {
  background: linear-gradient(135deg, #6636db, #7c4dff);
  color: #fff;
  padding: 6px 18px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.3px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(102, 54, 219, 0.3);
}

.btn-post-comment:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(102, 54, 219, 0.45);
}

.btn-cancel-comment {
  background: rgba(255, 255, 255, 0.05);
  color: #9494a8;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
  transition: all 0.2s ease;
}

.btn-cancel-comment:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ==========================================================================
   9. SINGLE ACTIVITY VIEW (.sa-*)
   ========================================================================== */

.sa-wrap {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 0;
  box-sizing: border-box;
}

.sa-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #76769b;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
  padding: 5px 12px;
  background: #1e1e29;
  border-radius: 20px;
  border: 1px solid #2d2d3e;
  transition: color .2s, border-color .2s;
}

.sa-back:hover {
  color: #eee;
  border-color: #6636db;
}

.sa-card {
  background: rgba(30, 30, 41, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--moe-border-divs, #2d2d3e);
  border-radius: 14px;
  padding: 20px 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.sa-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.sa-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sa-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.sa-avatar-ph {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  flex-shrink: 0;
}

.sa-author-name {
  font-weight: 800;
  font-size: 15px;
  color: #6636db;
  text-decoration: none;
}

.sa-author-name:hover {
  color: #9b72f5;
}

.sa-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.sa-time {
  background: rgba(255, 255, 255, 0.06);
  color: #eee;
  border-radius: 20px;
  padding: 1px 10px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.sa-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
}

.sa-comments-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #76769b;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.sa-comment-form {
  margin-bottom: 20px;
}

.sa-comment-form textarea {
  width: 100%;
  min-height: 70px;
  background: #1e1e29;
  border: 1px solid #2d2d3e;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 14px;
  padding: 10px 12px;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
}

.sa-comment-form textarea:focus {
  border-color: #6636db;
  outline: none;
  box-shadow: 0 0 0 2px rgba(102, 54, 219, .25);
}

.sa-comment-form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.sa-btn-comment {
  background: #6636db;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background .2s;
}

.sa-btn-comment:hover {
  background: #5a2fc9;
}

.sa-btn-comment:disabled {
  opacity: .6;
  cursor: default;
}

.sa-load-more {
  display: none;
  margin: 14px 0;
  text-align: center;
}

.sa-load-more button {
  background: #2d2d3e;
  color: #76769b;
  border: none;
  border-radius: 8px;
  padding: 7px 20px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.sa-load-more button:hover {
  background: #383850;
  color: #eee;
}

.sa-group-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.sa-group-thumb {
  display: block;
  width: 72px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  text-decoration: none;
  background: #2d2d3e;
  transition: transform .15s ease, box-shadow .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 13px;
  font-weight: 800;
}

.sa-group-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(102, 54, 219, .45);
}

.sa-group-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sa-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid #2d2d3e;
  padding-top: 18px;
}

.sa-group-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1e1e29;
  border: 1px solid #2d2d3e;
  border-radius: 10px;
  padding: 10px 14px;
  transition: border-color .2s;
}

.sa-group-item:hover {
  border-color: #6636db;
}

.sa-group-item-num {
  font-size: 11px;
  font-weight: 800;
  color: #76769b;
  min-width: 18px;
  text-align: center;
}

.sa-group-item-img {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

.sa-group-item-info {
  flex: 1;
  min-width: 0;
}

.sa-group-item-title {
  font-weight: 800;
  font-size: 14px;
  color: #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sa-group-item-title a {
  color: #eee;
  text-decoration: none;
}

.sa-group-item-title a:hover {
  color: #9b72f5;
}

.sa-group-item-sub {
  color: #76769b;
  font-size: 12px;
  margin-top: 2px;
}

.sa-group-item-time {
  color: #4a4a6a;
  font-size: 11px;
  margin-top: 3px;
}

/* ==========================================================================
   10. RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 768px) {
  .comment-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .comment-actions {
    flex-direction: row;
    margin-top: 8px;
  }
}

@media (max-width: 600px) {
  .activity-post {
    padding: 12px 14px;
  }
  .sa-card {
    padding: 14px 14px;
  }
  .sa-wrap {
    padding: 12px 10px;
  }
  .activity-media-card {
    gap: 10px;
    padding: 10px;
  }
  .activity-media-poster-link {
    width: 50px;
    height: 70px;
  }
  .activity-media-title {
    font-size: 13px;
  }
  .activity-trade-exchange {
    flex-direction: column;
    align-items: stretch;
  }
  .activity-trade-divider {
    transform: rotate(90deg);
    margin: 4px auto;
  }
  .af-post-image {
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
  .af-editor-toolbar {
    gap: 3px;
    padding: 6px 8px;
  }
  .af-toolbar-btn {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .af-top-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .af-controls-right {
    justify-content: space-between;
  }
}
