  /* Friends */
  .friends-tabs { display: flex; gap: 0; margin-bottom: 20px; border-bottom: 1px solid #2a2248; }
  .friends-tab-btn {
    padding: 10px 22px; background: none; border: none; border-bottom: 2px solid transparent;
    color: #ffffff; font-size: 14px; font-weight: 500; cursor: pointer;
    font-family: 'DM Sans', sans-serif; transition: all 0.2s;
  }
  .friends-tab-btn.active { color: #a78bfa; border-bottom-color: #a78bfa; }
  .friends-tab-btn:hover { color: #9990b3; }
  .friend-action-btn {
    padding: 5px 14px; border-radius: 4px; border: 1px solid; font-size: 12px;
    cursor: pointer; font-family: 'DM Sans', sans-serif; transition: all 0.2s;
    font-weight: 600; flex-shrink: 0;
  }
  .friend-add-btn { background: transparent; border-color: #7c3aed; color: #a78bfa; }
  .friend-add-btn:hover { background: #2a1f5e; }
  .friend-remove-btn { background: transparent; border-color: #3d3466; color: #a99dc6; }
  .friend-remove-btn:hover { border-color: #ef4444; color: #ef4444; }
  /* v925: "Requested" state — lavender-filled to confirm the request was sent */
  .friend-pending-btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-color: rgba(196,181,253,0.42);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(139,92,246,0.28);
  }
  .friend-pending-btn:hover { filter: brightness(1.08); }
  .friend-accept-btn { background: linear-gradient(135deg, #059669, #10b981); border-color: #10b981; color: #fff; }
  .friend-accept-btn:hover { filter: brightness(1.1); }
  .friend-friends-badge { background: rgba(34,197,94,0.1); border-color: #16a34a; color: #4ade80; cursor: default; }
  .friend-actions-group { display: flex; gap: 6px; flex-shrink: 0; }
  .requests-badge {
    background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
    padding: 1px 7px; border-radius: 4px; min-width: 18px; text-align: center;
    display: inline-block; margin-left: 4px;
  }
  .nav-badge {
    background: #ef4444; color: #fff; font-size: 9px; font-weight: 700;
    padding: 1px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle;
  }
  .user-card.locked { cursor: default; }
  .user-card.locked .user-card-stats::before { content: "🔒 "; }
  .find-search { width: 100%; max-width: 320px; margin-bottom: 16px; }
  .friends-empty {
    text-align: center; padding: 48px 20px; color: #b8afd1;
    border: 1px dashed #2a2248; border-radius: 6px;
  }
  .friends-empty-icon { font-size: 36px; margin-bottom: 10px; }
  .friends-empty-sub { font-size: 12px; color: #3d3466; margin-top: 6px; }


  /* Discover */
  .discover-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 14px; margin-bottom: 20px;
  }
  .discover-title {
    font-size: 24px; font-weight: 700; color: #e8e3f3;
    font-family: 'Sora', sans-serif;
  }
  .discover-subtitle {
    margin-top: 4px; font-size: 13px; color: #b8afd1;
  }
  .discover-hub-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 18px;
    padding: 4px;
    border: 1px solid rgba(196, 181, 253, 0.12);
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
  }
  .discover-hub-btn {
    min-height: 34px;
    padding: 7px 16px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #d8cff3;
    font-size: 12px;
    font-weight: 800;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: 0.01em;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background 90ms linear, color 90ms linear, box-shadow 90ms linear, transform 90ms linear;
  }
  .discover-hub-btn.active {
    background: rgba(139, 92, 246, 0.16);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(196, 181, 253, 0.12);
  }
  .discover-hub-btn:active { transform: scale(0.985); }
  #discover-view,
  #anime-discover-view,
  #games-discover-view {
    transform: translate3d(0, 0, 0);
    transform-origin: top center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: layout paint style;
  }
  .discover-hub-transitioning {
    pointer-events: none;
  }
  .discover-hub-enter,
  .discover-hub-exit {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .discover-search-row {
    display: flex; align-items: center; gap: 8px; margin: 0 0 22px;
    max-width: 620px;
  }
  .discover-search-input {
    flex: 1; width: 100%; min-width: 0; padding: 12px 14px !important;
    border-radius: 10px !important; font-size: 16px !important;
  }
  .discover-search-section { display: none; }
  .discover-search-section.active { display: block; }
  @media (max-width: 600px) {
    .discover-search-row { flex-wrap: nowrap; }
    .discover-search-input { flex-basis: 100%; }
  }
  .discover-section { margin-bottom: 28px; }
  .discover-section-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 12px;
  }
  .discover-section-title {
    font-size: 22px; font-weight: 800; color: #ffffff;
    letter-spacing: -0.01em; line-height: 1.15;
    font-family: 'Sora', sans-serif;
    margin: 0;
  }
  .discover-section-desc {
    max-width: 760px;
    margin: 10px 0 16px;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.55;
  }
  .discover-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
  }
  .discover-filter-btn {
    min-height: 34px;
    padding: 7px 14px;
    border: 1px solid rgba(196, 181, 253, 0.18);
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    color: #f7f3ff;
    font-size: 12px;
    font-weight: 800;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
  }
  .discover-filter-btn.active {
    background: rgba(139, 92, 246, 0.28);
    border-color: rgba(196, 181, 253, 0.34);
    color: #ffffff;
  }
  .activity-feed { display: grid; grid-template-columns: 1fr; gap: 10px; }
  @media (min-width: 700px) { .activity-feed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  .activity-item {
    display: flex; align-items: center; gap: 12px; padding: 12px;
    background: rgba(11,8,26,0.88); border: 1px solid #3d3466; border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
    cursor: pointer; transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  }
  .activity-item:hover { border-color: #7c3aed; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.32); }
  .activity-avatar,
  .activity-avatar-placeholder {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; object-fit: cover;
    background: #1e2028; border: 1px solid #3d3466;
  }
  .activity-avatar-placeholder { display: flex; align-items: center; justify-content: center; color: #a78bfa; font-size: 14px; }
  .activity-text { min-width: 0; flex: 1; font-size: 13px; color: #e8e3f3; line-height: 1.35; }
  .activity-name { color: #fff; font-weight: 700; }
  .activity-action { color: #bdb4d8; }
  .activity-title { color: #67e8f9; font-weight: 700; }
  .activity-time { color: #a99dc6; font-size: 11px; margin-top: 4px; }
  .activity-rating { color: #f59e0b; font-weight: 700; }
  .activity-title-link {
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    transition: color 0.15s ease;
  }
  .activity-title-link:hover { color: #a78bfa; }
  .activity-title-chevron { font-style: normal; opacity: 0.7; font-size: 0.9em; }
  .activity-page { display: none; }
  .activity-page.active { display: block; }


  .activity-page.active {
    position: fixed;
    inset: 0;
    z-index: 1500;
    overflow-y: auto;
    background: linear-gradient(135deg, #050410 0%, #15102d 50%, #050410 100%);
    padding-top: env(safe-area-inset-top, 0px);
  }
  .activity-page-opening {
    will-change: clip-path, opacity;
    backface-visibility: hidden;
    transform: translateZ(0);
    contain: paint;
  }
  .activity-page.active .main-content {
    max-width: 860px;
    padding-top: 76px;
    padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px));
  }
  .activity-page-back-floating {
    position: fixed !important;
    top: calc(env(safe-area-inset-top, 0px) + 14px) !important;
    right: 16px !important;
    z-index: 1600 !important;
    width: auto !important;
    margin: 0 !important;
    border-radius: 999px !important;
    background: rgba(26, 20, 48, 0.82) !important;
    border: 1px solid rgba(167, 139, 250, 0.35) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.26) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
  }
  body.light-mode .activity-page.active {
    background: #f4f1fb;
  }
  body.light-mode .activity-page-back-floating {
    background: rgba(237, 233, 254, 0.86) !important;
    border-color: rgba(124, 58, 237, 0.24) !important;
    color: #12082e !important;
  }
  .activity-page-header { margin-bottom: 20px; }
  .activity-page-title {
    font-size: 22px; font-weight: 700; color: #e8e3f3;
    font-family: 'Sora', sans-serif; margin-bottom: 4px;
  }
  .activity-page-subtitle { font-size: 13px; color: #9a90b5; }
  .activity-cover,
  .activity-cover-placeholder {
    width: 34px; height: 50px; border-radius: 5px; object-fit: cover; flex-shrink: 0;
    background: #171226; border: 1px solid #3d3466;
  }
