    /* DISCORD MODAL REDESIGN STYLES */
    .modal-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0, 0, 0, 0.7);
      backdrop-filter: blur(3px);
      z-index: 3900;
      display: none;
      opacity: 0;
      transition: opacity 0.2s ease-in-out;
    }
    .modal-backdrop.active {
      display: block;
      opacity: 1;
    }

    .discord-modal {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%) translate3d(0, 0, 0);
      will-change: transform;
      backface-visibility: hidden;
      background: #313338;
      color: #dbdee1;
      border-radius: 12px;
      box-shadow: 0 8px 16px rgba(0, 0, 0, 0.24);
      z-index: 4000;
      display: none;
      flex-direction: column;
      width: 90%;
      max-width: 440px;
      box-sizing: border-box;
      overflow: hidden;
      font-family: 'Inter', system-ui, -apple-system, sans-serif;
    }
    
    .discord-modal.active-modal {
      display: flex;
      animation: discordModalScale 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    }

    @keyframes discordModalScale {
      from {
        transform: translate(-50%, -50%) scale(0.92);
        opacity: 0;
      }
      to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
      }
    }

    .discord-modal-header {
      padding: 24px 24px 16px 24px;
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
    }
    .discord-modal-header-text {
      display: flex;
      flex-direction: column;
    }
    .discord-modal-title {
      font-size: 1.25rem;
      font-weight: 700;
      color: #f2f3f5;
      margin: 0;
    }
    .discord-modal-subtitle {
      font-size: 0.85rem;
      color: #b5bac1;
      margin-top: 4px;
    }
    .discord-modal-close {
      background: none;
      border: none;
      font-size: 1.5rem;
      cursor: pointer;
      color: #b5bac1;
      transition: color 0.15s ease, background-color 0.15s ease;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
      margin: -6px -6px 0 0;
    }
    .discord-modal-close:hover {
      color: #f2f3f5;
      background-color: rgba(255, 255, 255, 0.06);
    }

    .discord-modal-content {
      padding: 0 24px 24px 24px;
      overflow-y: auto;
      max-height: 55vh;
      display: flex;
      flex-direction: column;
      gap: 16px;
    }
    
    .discord-modal-content::-webkit-scrollbar {
      width: 8px;
    }
    .discord-modal-content::-webkit-scrollbar-track {
      background: #2b2d31;
      border-radius: 4px;
    }
    .discord-modal-content::-webkit-scrollbar-thumb {
      background: #1a1b1e;
      border-radius: 4px;
    }

    .discord-form-group {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .discord-label {
      font-size: 0.72rem;
      font-weight: 700;
      color: var(--muted, #b5bac1);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    .discord-input {
      background-color: var(--bg-soft, #f2f3f5);
      border: 1px solid var(--line, rgba(0,0,0,0.15));
      color: var(--text, #313338);
      padding: 10px 12px;
      border-radius: 4px;
      font-size: 0.875rem;
      font-family: inherit;
      width: 100%;
      box-sizing: border-box;
      transition: border-color 0.15s ease;
    }
    html[data-theme="dark"] .discord-input {
      background-color: #1e1f22;
      border-color: rgba(0,0,0,0);
      color: #dbdee1;
    }
    .discord-input:focus {
      outline: none;
      border-color: #5865f2;
    }
    .discord-select {
      background-color: var(--bg-soft, #f2f3f5);
      border: 1px solid var(--line, rgba(0,0,0,0.15));
      color: var(--text, #313338);
      padding: 10px 12px;
      border-radius: 4px;
      font-size: 0.875rem;
      font-family: inherit;
      width: 100%;
      box-sizing: border-box;
      cursor: pointer;
      transition: border-color 0.15s ease;
      appearance: none;
      background-image: url("data:image/svg+xml;utf8,<svg fill='%23b5bac1' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
      background-repeat: no-repeat;
      background-position: right 10px center;
    }
    html[data-theme="dark"] .discord-select {
      background-color: #1e1f22;
      border-color: rgba(0,0,0,0);
      color: #dbdee1;
    }
    .discord-select:focus {
      outline: none;
      border-color: #5865f2;
    }

    .discord-modal-footer {
      background-color: #2b2d31;
      padding: 16px 24px;
      display: flex;
      justify-content: flex-end;
      gap: 12px;
      align-items: center;
      border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    .discord-btn-cancel {
      background: none;
      border: none;
      color: var(--text, #313338);
      font-size: 0.875rem;
      font-weight: 500;
      cursor: pointer;
      padding: 10px 20px;
      border-radius: 3px;
      transition: background-color 0.15s ease;
    }
    .discord-btn-cancel:hover {
      background-color: rgba(0, 0, 0, 0.05);
    }
    html[data-theme="dark"] .discord-btn-cancel {
      color: #f2f3f5;
    }
    html[data-theme="dark"] .discord-btn-cancel:hover {
      background-color: rgba(255, 255, 255, 0.05);
    }
    .discord-btn-save {
      background-color: #5865f2;
      color: #ffffff;
      border: none;
      font-size: 0.875rem;
      font-weight: 500;
      cursor: pointer;
      padding: 10px 24px;
      border-radius: 3px;
      transition: background-color 0.15s ease;
    }
    .discord-btn-save:hover {
      background-color: #4752c4;
    }
    .discord-btn-save:disabled {
      background-color: #3c4270;
      color: #72767d;
      cursor: not-allowed;
    }

    /* PREMIUM OVERRIDES FOR DISCORD UI */
    body.premium-active .discord-btn-save {
      background-color: #ffd700;
      color: #000000;
      font-weight: 700;
    }
    body.premium-active .discord-btn-save:hover {
      background-color: #e6c200;
    }
    body.premium-active .discord-input:focus,
    body.premium-active .discord-select:focus {
      border-color: #ffd700;
    }

    /* DISCORD FRIEND LIST CHECKBOX UI */
    .discord-friend-list {
      max-height: 180px;
      overflow-y: auto;
      border: 1px solid #1e1f22;
      border-radius: 6px;
      padding: 6px;
      background-color: #2b2d31;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }
    .discord-friend-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 10px;
      border-radius: 6px;
      background-color: transparent;
      transition: background-color 0.15s ease;
      cursor: pointer;
      user-select: none;
    }
    .discord-friend-item:hover {
      background-color: rgba(255, 255, 255, 0.04);
    }
    .discord-friend-info {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .discord-friend-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background-color: #5865f2;
      color: #ffffff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 0.85rem;
      overflow: hidden;
      border: 1px solid rgba(255,255,255,0.05);
    }
    body.premium-active .discord-friend-avatar {
      background-color: #ffd700;
      color: #000000;
    }
    .discord-friend-avatar img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .discord-friend-names {
      display: flex;
      flex-direction: column;
    }
    .discord-friend-display-name {
      font-size: 0.875rem;
      font-weight: 600;
      color: #f2f3f5;
    }
    .discord-friend-username {
      font-size: 0.75rem;
      color: #b5bac1;
    }
    
    .discord-checkbox-wrapper {
      position: relative;
      width: 20px;
      height: 20px;
    }
    .discord-checkbox-wrapper input[type="checkbox"] {
      position: absolute;
      opacity: 0;
      cursor: pointer;
      height: 0;
      width: 0;
    }
    .discord-checkbox {
      position: absolute;
      top: 0;
      left: 0;
      height: 20px;
      width: 20px;
      background-color: transparent;
      border: 2px solid #b5bac1;
      border-radius: 4px;
      transition: background-color 0.15s ease, border-color 0.15s ease;
      box-sizing: border-box;
    }
    .discord-checkbox-wrapper:hover input ~ .discord-checkbox {
      border-color: #f2f3f5;
    }
    .discord-checkbox-wrapper input:checked ~ .discord-checkbox {
      background-color: #5865f2;
      border-color: #5865f2;
    }
    body.premium-active .discord-checkbox-wrapper input:checked ~ .discord-checkbox {
      background-color: #ffd700;
      border-color: #ffd700;
    }
    .discord-checkbox::after {
      content: "";
      position: absolute;
      display: none;
      left: 5px;
      top: 1px;
      width: 5px;
      height: 10px;
      border: solid #ffffff;
      border-width: 0 2px 2px 0;
      transform: rotate(45deg);
    }
    body.premium-active .discord-checkbox::after {
      border-color: #000000;
    }
    .discord-checkbox-wrapper input:checked ~ .discord-checkbox::after {
      display: block;
    }

    /* SOCIAX SCROLLS, CONFIRMATIONS, AUDIO/CALL POLISH */
    .sociax-viewport,
    #chatViewWrapper,
    #chatViewWrapper > .viewport-pane,
    .sidebar-panels-container,
    .sidebar-panel {
      min-height: 0 !important;
    }
    .sociax-chat-messages {
      min-height: 0;
      max-height: calc(100vh - 154px);
      overflow-y: auto !important;
      overscroll-behavior: contain;
      scroll-behavior: smooth;
      scrollbar-width: thin;
      scrollbar-color: rgba(var(--sociax-accent-rgb),.65) transparent;
    }
    #pinnedFriendsList {
      max-height: min(38vh, 420px);
      overflow-y: auto;
      padding-right: 4px;
      scrollbar-width: thin;
      scrollbar-color: rgba(var(--sociax-accent-rgb),.55) transparent;
    }
    .contacts-list {
      max-height: min(34vh, 360px);
      overflow-y: auto;
      padding-right: 4px;
      scrollbar-width: thin;
      scrollbar-color: rgba(var(--sociax-accent-rgb),.55) transparent;
    }
    .discord-friend-list,
    #privateProfilePanel,
    .sidebar-panel {
      scrollbar-width: thin;
      scrollbar-color: rgba(var(--sociax-accent-rgb),.55) transparent;
    }
    .sociax-chat-messages::-webkit-scrollbar,
    #pinnedFriendsList::-webkit-scrollbar,
    .contacts-list::-webkit-scrollbar,
    .discord-friend-list::-webkit-scrollbar,
    #privateProfilePanel::-webkit-scrollbar,
    .sidebar-panel::-webkit-scrollbar {
      width: 10px;
    }
    .sociax-chat-messages::-webkit-scrollbar-track,
    #pinnedFriendsList::-webkit-scrollbar-track,
    .contacts-list::-webkit-scrollbar-track,
    .discord-friend-list::-webkit-scrollbar-track,
    #privateProfilePanel::-webkit-scrollbar-track,
    .sidebar-panel::-webkit-scrollbar-track {
      background: transparent;
    }
    .sociax-chat-messages::-webkit-scrollbar-thumb,
    #pinnedFriendsList::-webkit-scrollbar-thumb,
    .contacts-list::-webkit-scrollbar-thumb,
    .discord-friend-list::-webkit-scrollbar-thumb,
    #privateProfilePanel::-webkit-scrollbar-thumb,
    .sidebar-panel::-webkit-scrollbar-thumb {
      background: var(--sociax-accent-gradient);
      border: 3px solid transparent;
      border-radius: 999px;
      background-clip: padding-box;
    }
    .sociax-unread-filter-bar {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 6px;
      margin: 4px 0 8px;
      padding: 4px;
      border: 1px solid var(--line);
      border-radius: 999px;
      background: rgba(255,255,255,.52);
    }
    html[data-theme="dark"] .sociax-unread-filter-bar {
      background: rgba(255,255,255,.045);
    }
    .sociax-filter-chip {
      border: 0;
      border-radius: 999px;
      background: transparent;
      color: var(--muted);
      padding: 7px 8px;
      font-size: .72rem;
      font-weight: 900;
      cursor: pointer;
      transition: background .18s ease, color .18s ease, transform .18s ease;
    }
    .sociax-filter-chip:hover {
      transform: translateY(-1px);
      color: var(--text);
    }
    .sociax-filter-chip.active {
      color: #fff;
      background: var(--sociax-accent-gradient);
      box-shadow: 0 8px 20px rgba(var(--sociax-accent-rgb),.22);
    }
    .sociax-notice-stack {
      position: fixed;
      right: 22px;
      bottom: 22px;
      display: flex;
      flex-direction: column;
      gap: 10px;
      z-index: 10030;
      pointer-events: none;
    }
    .sociax-notice {
      min-width: min(360px, calc(100vw - 44px));
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 13px 14px;
      border: 1px solid rgba(var(--sociax-accent-rgb),.34);
      border-radius: 18px;
      background: rgba(14, 18, 22, .92);
      color: #fff;
      font-size: .86rem;
      font-weight: 800;
      box-shadow: 0 20px 45px rgba(0,0,0,.28);
      backdrop-filter: blur(16px);
      opacity: 0;
      transform: translateY(10px) scale(.98);
      transition: opacity .2s ease, transform .2s ease;
    }
    .sociax-notice.show {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
    .sociax-notice-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--sociax-accent);
      box-shadow: 0 0 0 5px rgba(var(--sociax-accent-rgb),.16);
      flex: 0 0 auto;
    }
    .sociax-confirm-overlay {
      position: fixed;
      inset: 0;
      display: grid;
      place-items: center;
      padding: 20px;
      background: rgba(0,0,0,.34);
      z-index: 10040;
      opacity: 0;
      transition: opacity .16s ease;
      backdrop-filter: blur(8px);
    }
    .sociax-confirm-overlay.show {
      opacity: 1;
    }
    .sociax-confirm-card {
      width: min(440px, 100%);
      display: grid;
      grid-template-columns: 46px 1fr;
      gap: 14px;
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 24px;
      background: var(--surface);
      color: var(--text);
      box-shadow: 0 24px 70px rgba(0,0,0,.3);
      transform: translateY(8px) scale(.98);
      transition: transform .16s ease;
    }
    .sociax-confirm-overlay.show .sociax-confirm-card {
      transform: translateY(0) scale(1);
    }
    .sociax-confirm-icon {
      width: 46px;
      height: 46px;
      display: grid;
      place-items: center;
      border-radius: 16px;
      background: rgba(231,29,54,.12);
      color: #e71d36;
      font-weight: 1000;
      font-size: 1.25rem;
    }
    .sociax-confirm-copy {
      display: flex;
      flex-direction: column;
      gap: 6px;
      min-width: 0;
    }
    .sociax-confirm-copy strong {
      font-size: 1rem;
      font-weight: 1000;
    }
    .sociax-confirm-copy span {
      color: var(--muted);
      font-size: .86rem;
      line-height: 1.45;
    }
    .sociax-confirm-actions {
      grid-column: 1 / -1;
      display: flex;
      justify-content: flex-end;
      gap: 10px;
      padding-top: 8px;
    }
    .sociax-confirm-btn {
      border: 0;
      border-radius: 999px;
      padding: 10px 15px;
      font-weight: 950;
      cursor: pointer;
    }
    .sociax-confirm-btn.cancel {
      background: var(--bg-soft);
      color: var(--text);
      border: 1px solid var(--line);
    }
    .sociax-confirm-btn.ok {
      color: #fff;
      background: linear-gradient(135deg, #e71d36, #ff4d6d);
      box-shadow: 0 12px 24px rgba(231,29,54,.22);
    }
    .incoming-call-alert {
      width: min(560px, calc(100vw - 32px)) !important;
      align-items: center !important;
      gap: 16px !important;
      border: 1px solid rgba(var(--sociax-accent-rgb),.42) !important;
      border-radius: 24px !important;
      background: linear-gradient(135deg, rgba(7, 12, 16, .96), rgba(22, 32, 40, .94)) !important;
      box-shadow: 0 24px 60px rgba(0,0,0,.35), 0 0 0 8px rgba(var(--sociax-accent-rgb),.08) !important;
      backdrop-filter: blur(18px);
      overflow: hidden;
    }
    .incoming-call-alert::before {
      content: "";
      width: 48px;
      height: 48px;
      border-radius: 18px;
      background: radial-gradient(circle at 35% 30%, #fff 0 9%, transparent 10%), var(--sociax-accent-gradient);
      box-shadow: 0 12px 30px rgba(var(--sociax-accent-rgb),.32);
      flex: 0 0 auto;
    }
    .incoming-call-alert h4 {
      letter-spacing: -.02em;
      font-size: 1.05rem !important;
    }
    .incoming-call-alert p {
      line-height: 1.35;
    }
    .btn-alert-accept,
    .btn-alert-decline {
      border: 0 !important;
      border-radius: 999px !important;
      padding: 12px 18px !important;
      font-weight: 950 !important;
      box-shadow: 0 12px 26px rgba(0,0,0,.22);
      transition: transform .18s ease, filter .18s ease;
    }
    .btn-alert-accept:hover,
    .btn-alert-decline:hover {
      transform: translateY(-2px);
      filter: brightness(1.05);
    }
    #callFeedbackModal {
      border-radius: 28px !important;
      border: 1px solid rgba(var(--sociax-accent-rgb),.22) !important;
      background: linear-gradient(180deg, var(--surface), var(--bg-soft)) !important;
      color: var(--text) !important;
      box-shadow: 0 28px 80px rgba(0,0,0,.32) !important;
    }
    #callFeedbackModal .discord-modal-title {
      color: var(--text) !important;
      font-weight: 1000 !important;
      letter-spacing: -.03em;
    }
    #callFeedbackModal .discord-modal-subtitle,
    #callFeedbackModal .discord-label {
      color: var(--muted) !important;
    }
    #callFeedbackModal .discord-modal-footer {
      background: transparent !important;
      border-top: 1px solid var(--line);
    }
    #callFeedbackModal .sociax-feedback-options {
      gap: 14px !important;
      margin: 14px 0 18px !important;
    }
    #callFeedbackModal .sociax-feedback-option {
      min-height: 96px;
      border-radius: 22px;
      background: rgba(255,255,255,.55);
      box-shadow: 0 12px 26px rgba(0,0,0,.06);
      font-size: 1.75rem;
    }
    html[data-theme="dark"] #callFeedbackModal .sociax-feedback-option {
      background: rgba(255,255,255,.055);
    }
    #callFeedbackModal .sociax-feedback-option.active {
      border-color: rgba(var(--sociax-accent-rgb),.9);
      box-shadow: 0 16px 34px rgba(var(--sociax-accent-rgb),.18);
      background: linear-gradient(135deg, rgba(var(--sociax-accent-rgb),.18), rgba(0,119,182,.1));
    }

    /* MODERN NEUTRAL MODERATION BUTTONS */
    .admin-btn-neutral {
      background: var(--bg-soft) !important;
      border: 1px solid var(--line) !important;
      color: var(--text) !important;
      border-radius: 6px !important;
      cursor: pointer;
      font-weight: 700;
      transition: all 0.2s ease !important;
      box-shadow: none !important;
    }
    .admin-btn-neutral:hover {
      background: var(--line) !important;
      transform: translateY(-1px);
    }
    
    .admin-btn-neutral[data-admin-action="timeout"]:hover {
      color: #ff9f1c !important;
      border-color: #ff9f1c !important;
      background: rgba(255, 159, 28, 0.08) !important;
    }
    .admin-btn-neutral[data-admin-action="warn"]:hover {
      color: #ffd43b !important;
      border-color: #ffd43b !important;
      background: rgba(255, 212, 59, 0.08) !important;
    }
    .admin-btn-neutral[data-admin-action="ban"]:hover {
      color: #ff8787 !important;
      border-color: #ff8787 !important;
      background: rgba(255, 135, 135, 0.08) !important;
    }
    .admin-btn-neutral[data-admin-action="ban-ip"]:hover {
      color: #da77f2 !important;
      border-color: #da77f2 !important;
      background: rgba(218, 119, 242, 0.08) !important;
    }
    .admin-btn-neutral[data-admin-action="delete-account"]:hover {
      color: #ff8787 !important;
      border-color: #ff8787 !important;
      background: rgba(255, 135, 135, 0.08) !important;
    }
    .admin-btn-neutral[data-admin-action="certify"]:hover {
      color: #4dadf7 !important;
      border-color: #4dadf7 !important;
      background: rgba(77, 173, 247, 0.08) !important;
    }
    .admin-btn-neutral[data-admin-action="grant-admin"]:hover {
      color: #ff8787 !important;
      border-color: #ff8787 !important;
      background: rgba(255, 135, 135, 0.08) !important;
    }

    /* Cookie Banner styling */
    .cookie-banner {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      background: rgba(17, 18, 20, 0.96);
      backdrop-filter: blur(10px);
      border-top: 1px solid var(--line);
      z-index: 5000;
      padding: 10px 0;
      box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
      animation: bannerSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    @keyframes bannerSlideUp {
      from { transform: translateY(100%); }
      to { transform: translateY(0); }
    }

    .cookie-content {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      max-width: 960px;
      margin: 0 auto;
      padding: 6px 20px;
      font-size: 0.82rem;
      color: #b5bac1;
      line-height: 1.5;
    }

    /* Audit Modal Styles */
    .audit-target-btn {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      padding: 8px 12px;
      border: none;
      background: none;
      border-radius: 6px;
      color: #b5bac1;
      cursor: pointer;
      text-align: left;
      transition: background-color 0.15s ease, color 0.15s ease;
      box-sizing: border-box;
    }
    .audit-target-btn:hover {
      background-color: rgba(255, 255, 255, 0.06);
      color: #f2f3f5;
    }
    .audit-target-btn.active {
      background-color: rgba(255, 255, 255, 0.1);
      color: #ffffff;
      font-weight: 700;
    }
    .audit-chat-msg {
      display: flex;
      gap: 10px;
      align-items: flex-start;
      margin-bottom: 12px;
      font-size: 0.82rem;
    }
    .audit-chat-msg .msg-text {
      background: #383a40;
      padding: 8px 12px;
      border-radius: 8px;
      color: #dbdee1;
      max-width: 85%;
      word-break: break-word;
    }
    .audit-chat-msg.self .msg-text {
      background: #404249;
    }

  


/* Sociax crisp legal modal fix */
.modal-backdrop {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.discord-modal {
  will-change: auto !important;
  backface-visibility: visible !important;
  transform: translate(-50%, -50%) !important;
}

.discord-modal.active-modal {
  animation: none !important;
}

#legalModal {
  filter: none !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

#legalModal .discord-modal-content,
#legalModal .discord-modal-title,
#legalModal .discord-modal-subtitle {
  filter: none !important;
  text-shadow: none !important;
}
