/* ===================================
   ACCOUNT, AUTH, PROFILE & FRIENDS
   =================================== */

.friends-loading {
  padding: 20px;
}

.ticket-action-icon {
  vertical-align: middle;
  margin-right: 3px;
}

.auth-section {
  padding: var(--section-padding, 60px) 0;
}

.auth-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border: 1px solid rgba(167, 139, 255, 0.2);
  border-radius: var(--border-radius);
  padding: 28px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.auth-card--wide {
  max-width: 980px;
  width: min(100%, 980px);
  position: relative;
}

.auth-subtitle {
  color: var(--text-muted);
  margin-top: -6px;
  margin-bottom: 20px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-form input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 139, 255, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-color);
}

.auth-form textarea {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 139, 255, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-color);
  resize: vertical;
  min-height: 120px;
}

.auth-terms {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-terms a {
  color: var(--accent-color);
}

.auth-terms a:hover {
  color: var(--primary-color);
}

/* Auth Divider ("or") */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(167, 139, 255, 0.18);
}

/* Google Sign-In Button */
.btn-google-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-color);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.btn-google-login:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(167, 139, 255, 0.45);
  transform: translateY(-1px);
}

.btn-google-login svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.settings-help {
  margin-top: -6px;
  margin-bottom: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Settings Section Divider */
.settings-section-divider {
  height: 1px;
  background: var(--border-color);
  margin: 24px 0;
}

/* Toggle Switch Styles */
.setting-row-toggle {
  align-items: center;
  padding: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  margin-bottom: 8px;
}

.toggle-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.toggle-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-color);
}

.toggle-description {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toggle-switch {
  position: relative;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  display: block;
  width: 48px;
  height: 26px;
  background: var(--border-color);
  border-radius: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
}

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 100, 100, 255), 0.2);
}

/* Settings Row with Inline Privacy */
.setting-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.setting-field {
  flex: 1;
  min-width: 0;
}

.setting-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-color);
}

.setting-field input,
.setting-field textarea,
.setting-field .select-field {
  width: 100%;
}

.privacy-inline {
  flex-shrink: 0;
  margin-top: 28px;
  position: relative;
}

/* Privacy Custom Dropdown */
.privacy-dropdown {
  position: relative;
}

.privacy-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text-color);
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  min-width: 130px;
}

.privacy-dropdown-trigger:hover {
  border-color: var(--primary-color);
}

.privacy-dropdown.is-open .privacy-dropdown-trigger {
  border-color: var(--primary-color);
  box-shadow: var(--glow-secondary);
}

.privacy-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.privacy-label {
  flex: 1;
}

.privacy-caret {
  color: var(--text-muted);
  transition: transform 0.2s;
}

.privacy-dropdown.is-open .privacy-caret {
  transform: rotate(180deg);
}

.privacy-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 4px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition:
    opacity 0.15s,
    visibility 0.15s,
    transform 0.15s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.privacy-dropdown.is-open .privacy-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.privacy-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text-color);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}

.privacy-option:hover {
  background: rgba(255, 255, 255, 0.05);
}

.privacy-option.active {
  background: rgba(167, 139, 255, 0.15);
  color: var(--primary-color);
}

.privacy-option svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.privacy-option.active svg {
  color: var(--primary-color);
}

/* Hide tooltip when dropdown is open */
.privacy-dropdown.is-open .has-tooltip::before,
.privacy-dropdown.is-open .has-tooltip::after,
.privacy-inline:has(.privacy-dropdown.is-open)::before,
.privacy-inline:has(.privacy-dropdown.is-open)::after {
  display: none !important;
}

.privacy-select-inline {
  appearance: none;
  background: var(--bg-tertiary);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  padding: 8px 12px 8px 30px;
  font-size: 0.8rem;
  color: var(--text-color);
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  min-width: 130px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  padding-right: 28px;
}

.privacy-select-inline:hover {
  border-color: var(--primary-color);
}

.privacy-select-inline:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: var(--glow-secondary);
}

.privacy-select-inline option {
  background: var(--bg-secondary);
  color: var(--text-color);
  padding: 8px;
}

.auth-form input[type="file"] {
  padding: 10px 12px;
}

.auth-form input[type="file"]::file-selector-button {
  border: 1px solid rgba(167, 139, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: 999px;
  margin-right: 12px;
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.auth-form input[type="file"]::file-selector-button:hover {
  color: var(--accent-green);
  border-color: rgba(53, 224, 124, 0.5);
  background: rgba(53, 224, 124, 0.08);
  transform: translateY(-1px);
}

.auth-form select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 139, 255, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-color);
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b9aef8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 44px;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.auth-form select:hover {
  border-color: rgba(53, 224, 124, 0.5);
  background: rgba(53, 224, 124, 0.08);
  transform: translateY(-1px);
}

.auth-form select:focus {
  outline: none;
  border-color: rgba(53, 224, 124, 0.6);
  box-shadow: 0 0 0 2px rgba(53, 224, 124, 0.2);
}

.auth-form select option {
  background: #120f1a;
  color: #e8e3ff;
}

.settings-privacy {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(167, 139, 255, 0.15);
}

.settings-privacy-visibility {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(167, 139, 255, 0.15);
}

.settings-privacy-visibility h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.settings-privacy-visibility .auth-subtitle {
  margin-bottom: 16px;
}

.btn-danger {
  background: transparent;
  color: #ff8a8a;
  border: 1px solid rgba(255, 138, 138, 0.5);
}

.btn-danger:hover {
  background: rgba(126, 22, 22, 0.45);
  border-color: rgba(255, 138, 138, 0.9);
  color: #fff;
}

.btn-danger-outline {
  color: #ff8a8a;
  border-color: rgba(255, 138, 138, 0.4);
}

.btn-danger-outline:hover {
  background: rgba(255, 138, 138, 0.1);
  border-color: rgba(255, 138, 138, 0.7);
}

.select-field {
  position: relative;
}

.select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 139, 255, 0.25);
  border-radius: 12px;
  color: var(--text-color);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.select-trigger:hover {
  border-color: rgba(53, 224, 124, 0.5);
  background: rgba(53, 224, 124, 0.08);
  transform: translateY(-1px);
}

.select-trigger:focus {
  outline: none;
  border-color: rgba(53, 224, 124, 0.6);
  box-shadow: 0 0 0 2px rgba(53, 224, 124, 0.2);
}

.select-caret {
  width: 10px;
  height: 10px;
  border-right: 2px solid #b9aef8;
  border-bottom: 2px solid #b9aef8;
  transform: rotate(45deg);
  margin-top: -2px;
}

.select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: rgba(15, 13, 22, 0.98);
  border: 1px solid rgba(167, 139, 255, 0.25);
  border-radius: 12px;
  padding: 8px;
  max-height: 220px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
  z-index: 1400;
}

.select-field.is-open .select-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.select-menu::-webkit-scrollbar {
  width: 8px;
}

.select-menu::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.select-menu::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 255, 0.35);
  border-radius: 8px;
}

.select-option {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  color: var(--text-color);
  cursor: pointer;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
  margin-bottom: 6px;
}

.select-option:last-child {
  margin-bottom: 0;
}

.select-option:hover,
.select-option.is-active {
  color: var(--accent-green);
  border-color: rgba(53, 224, 124, 0.4);
  background: rgba(53, 224, 124, 0.08);
}

.account-title-photo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(167, 139, 255, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  margin-bottom: 8px;
}

.account-title-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-title-photo--icon {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.account-title-photo--icon svg {
  width: 36px;
  height: 36px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.account-view-profile-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
}

.account-title {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}

.account-title-name {
  font-weight: 600;
  color: var(--text-color);
  letter-spacing: 0.2px;
}

.account-tab--link {
  position: relative;
  text-decoration: none;
}

.account-tab--link .friend-notification-badge,
.account-tab .friend-notification-badge {
  position: relative;
  top: auto;
  right: auto;
  margin-left: 6px;
  display: inline-flex;
}

/* Friends container inline (inside account) */
.friends-container-inline {
  padding: 0;
}

.friends-container-inline .friends-search-section {
  margin-bottom: 20px;
}

.friends-container-inline .friends-tabs {
  margin-bottom: 20px;
}

.friends-container-inline .friends-section-title {
  font-size: 1rem;
}

.auth-alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.auth-alert.success {
  background: rgba(18, 94, 54, 0.55);
  color: #e9fff3;
  border: 1px solid rgba(53, 224, 124, 0.3);
}

.auth-alert.error {
  background: rgba(120, 28, 34, 0.55);
  color: #ffe5e5;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

.account-info {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.account-info div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(167, 139, 255, 0.2);
  border-radius: 12px;
  padding: 12px 14px;
}

.account-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.account-value {
  font-weight: 600;
}

.account-actions {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.message-list {
  display: grid;
  gap: 12px;
}

.account-tabs {
  display: flex;
  gap: 10px;
  margin: 14px 0 18px;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 255, 0.5) rgba(15, 13, 22, 0.2);
  padding-bottom: 6px;
}

.account-tabs::-webkit-scrollbar {
  height: 6px;
}

.account-tabs::-webkit-scrollbar-track {
  background: rgba(15, 13, 22, 0.2);
  border-radius: 999px;
}

.account-tabs::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 255, 0.5);
  border-radius: 999px;
}

.account-tabs::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 255, 0.75);
}

.account-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 255, 0.2);
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  font-family: inherit;
  font-size: 0.82rem;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
  flex: 0 0 auto;
  white-space: nowrap;
  position: relative;
}

.message-center-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ff4d4d;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(255, 77, 77, 0.6);
}

/* Friends indicators - red dots for pending friend requests */
.friends-indicator,
.friends-nav-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ff4d4d;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(255, 77, 77, 0.6);
}

.friends-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #b91c1c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  margin-left: 6px;
  box-shadow: 0 0 8px rgba(255, 77, 77, 0.6);
}

.purchases-update-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ff4d4d;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(255, 77, 77, 0.6);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

.download-update-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #ff4d4d;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(255, 77, 77, 0.6);
  animation: pulse-dot 1.5s ease-in-out infinite;
}

.order-item-download {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn.has-update {
  border-color: #ff4d4d;
  color: #ff4d4d;
}

.btn.has-update:hover {
  background: rgba(255, 77, 77, 0.1);
}

.order-item-changelog {
  width: 100%;
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.order-item-changelog.is-hidden {
  display: none;
}

.changelog-content {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent-green);
  padding: 4px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

.btn-text:hover {
  color: var(--accent-green);
  opacity: 0.8;
}

.account-tab.active,
.account-tab:hover {
  color: var(--accent-green);
  border-color: rgba(53, 224, 124, 0.5);
  background: rgba(53, 224, 124, 0.08);
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.account-panel.is-hidden {
  display: none;
}

.message-empty.is-hidden {
  display: none;
}

.message-item {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 139, 255, 0.2);
  position: relative;
  transition:
    transform 0.18s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.message-item--list:hover {
  transform: scale(1.01);
  border-color: rgba(53, 224, 124, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.message-item--list {
  overflow: hidden;
  padding-right: 44px;
}

.message-item.is-unread {
  border-color: rgba(53, 224, 124, 0.45);
  box-shadow: 0 0 0 1px rgba(53, 224, 124, 0.2);
}

.message-item.is-active {
  border-color: rgba(167, 139, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(167, 139, 255, 0.35);
}

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

.message-title {
  flex: 1;
  font-weight: 600;
  margin-bottom: 4px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message-item-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.message-item-link:focus {
  outline: none;
}

.message-item--list .message-title {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.message-preview {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 6px 0 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.message-delete-form {
  margin: 0;
  display: flex;
  align-items: center;
  position: absolute;
  top: 12px;
  right: 12px;
}

.message-delete {
  background: transparent !important;
  border: none !important;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-muted);
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  box-shadow: none;
  outline: none;
}

.message-delete:focus {
  outline: none;
  box-shadow: none;
}

.message-delete:hover {
  color: #ff6b6b;
  transform: scale(1.1);
}

.messages-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.message-body {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 6px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.message-body--full.is-hidden {
  display: none;
}

.message-item.is-expanded .message-body--full {
  display: block;
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.account-purchases {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Ticket chat (user message center) */
.ticket-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 20px;
  margin-top: 20px;
}

.ticket-toggle-list {
  display: none;
}

.ticket-layout.is-collapsed {
  grid-template-columns: 1fr;
}

.ticket-layout.is-collapsed .ticket-list {
  display: none;
}

.ticket-layout.is-collapsed .ticket-chat {
  display: flex;
}

.ticket-layout.is-collapsed .ticket-toggle-list {
  display: inline-flex;
}

.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 255, 0.6) rgba(15, 13, 22, 0.3);
}

.ticket-list::-webkit-scrollbar {
  width: 8px;
}

.ticket-list::-webkit-scrollbar-track {
  background: rgba(15, 13, 22, 0.3);
  border-radius: 999px;
}

.ticket-list::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 255, 0.6);
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 255, 0.3);
}

.ticket-list::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 255, 0.85);
}

.ticket-list-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.03);
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.ticket-list-item:hover {
  border-color: rgba(167, 139, 255, 0.6);
  background: rgba(167, 139, 255, 0.1);
}

.ticket-list-item.is-active {
  border-color: rgba(167, 139, 255, 0.8);
  background: rgba(167, 139, 255, 0.14);
}

.ticket-list-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.ticket-list-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ticket-list-time {
  font-size: 0.75rem;
  color: #8f89ab;
}

.ticket-chat {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.ticket-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ticket-chat-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ticket-chat-subject {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.ticket-chat-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 255, 0.6) rgba(15, 13, 22, 0.3);
}

.ticket-chat-body::-webkit-scrollbar {
  width: 8px;
}

.ticket-chat-body::-webkit-scrollbar-track {
  background: rgba(15, 13, 22, 0.3);
  border-radius: 999px;
}

.ticket-chat-body::-webkit-scrollbar-thumb {
  background: rgba(167, 139, 255, 0.6);
  border-radius: 999px;
  border: 1px solid rgba(167, 139, 255, 0.3);
}

.ticket-chat-body::-webkit-scrollbar-thumb:hover {
  background: rgba(167, 139, 255, 0.85);
}

.ticket-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-style: italic;
}

.ticket-bubble {
  max-width: 75%;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ticket-bubble--admin {
  align-self: flex-end;
  background: rgba(167, 139, 255, 0.18);
  border-color: rgba(167, 139, 255, 0.4);
}

.ticket-bubble--user {
  align-self: flex-start;
}

.ticket-bubble-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.read-receipt {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
}

.read-receipt svg {
  width: 14px;
  height: 14px;
}

.admin-content .ticket-bubble-meta {
  gap: 3px;
}

.admin-content .ticket-bubble-meta .read-receipt {
  margin-left: 2px;
  transform: scale(0.8);
  transform-origin: center;
}

.admin-content .ticket-bubble-meta .read-receipt svg {
  width: 10px;
  height: 10px;
}

.read-receipt--sent {
  color: var(--text-muted);
}

.read-receipt--read {
  color: #00d26a;
}

.messenger-receipt-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.messenger-receipt-badge svg {
  width: 12px;
  height: 12px;
}

.ticket-bubble-text {
  white-space: pre-line;
}

/* Chat Image Styles */
.ticket-bubble-image {
  margin: 8px 0;
}

.ticket-bubble-image .chat-image {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.ticket-bubble-image .chat-image:hover {
  transform: scale(1.02);
}

/* Upload Preview Styles */
.upload-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.upload-label .upload-icon {
  font-size: 1.1em;
}

.form-control-file {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 6px 0;
}

.form-control-file::-webkit-file-upload-button {
  background: rgba(167, 139, 255, 0.15);
  border: 1px solid rgba(167, 139, 255, 0.3);
  color: var(--accent-color);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  margin-right: 10px;
  transition: background 0.2s ease;
}

.form-control-file::file-selector-button {
  background: rgba(167, 139, 255, 0.15);
  border: 1px solid rgba(167, 139, 255, 0.3);
  color: var(--accent-color);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  margin-right: 10px;
  transition: background 0.2s ease;
}

.form-control-file::-webkit-file-upload-button:hover {
  background: rgba(167, 139, 255, 0.25);
}

.form-control-file::file-selector-button:hover {
  background: rgba(167, 139, 255, 0.25);
}

.upload-preview {
  position: relative;
  display: inline-block;
  margin-top: 8px;
}

.upload-preview-img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 8px;
  border: 1px solid rgba(167, 139, 255, 0.3);
}

.upload-preview-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #b42318;
  color: #ffffff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.upload-preview-remove:hover {
  background: #c0392b;
}

.ticket-reply-form {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.ticket-reply-form .form-group {
  margin: 0;
}

.ticket-reply-form .form-group:first-of-type {
  flex: 1;
  min-width: 200px;
}

.ticket-reply-form .form-group:nth-of-type(2) {
  width: 100%;
  order: 3;
}

.ticket-reply-form .form-group label {
  display: none;
}

.ticket-reply-form .form-group:nth-of-type(2) label {
  display: inline-flex;
}

.ticket-reply-form textarea,
.ticket-reply-form input[type="text"] {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(167, 139, 255, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text-color);
  width: 100%;
}

.ticket-reply-form textarea {
  resize: none;
  min-height: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  line-height: 1.4;
}

.ticket-reply-form button[type="submit"] {
  flex-shrink: 0;
  align-self: stretch;
  min-height: 48px;
}

.ticket-reply-form textarea.rate-limited {
  border-color: rgba(255, 138, 138, 0.6);
  animation: rate-limit-shake 0.4s ease-in-out;
}

.ticket-reply-form textarea.rate-limited::placeholder {
  color: #ff8a8a;
}

@keyframes rate-limit-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-3px);
  }
  80% {
    transform: translateX(2px);
  }
}

@media (max-width: 980px) {
  .ticket-layout {
    grid-template-columns: 1fr;
  }

  .ticket-layout.is-collapsed .ticket-list {
    display: none;
  }

  .ticket-layout.is-collapsed .ticket-chat {
    display: flex;
  }

  .ticket-toggle-list {
    display: inline-flex;
  }

  .ticket-list,
  .ticket-chat-body {
    max-height: none;
  }
}

/* Chat Image Lightbox */
.chat-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.chat-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.chat-lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.chat-lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.58);
  border: none;
  color: #ffffff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.chat-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.78);
}

/* ===================================
   PROFILE & FRIENDS STYLES
   =================================== */

/* Profile Container */
.profile-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.profile-not-found {
  text-align: center;
  padding: 80px 20px;
}

.profile-not-found h1 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.profile-not-found p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Profile Header */
.profile-header {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--stroke);
}

.profile-photo-section {
  flex-shrink: 0;
}

.profile-photo,
.profile-photo-large {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-color);
  box-shadow: var(--glow-primary);
}

.profile-photo-placeholder,
.profile-photo-placeholder-large {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 3px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  font-weight: 600;
  color: var(--primary-color);
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-display-name {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-nickname {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.profile-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 20px;
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.profile-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.profile-actions .inline-form {
  display: inline;
}

/* Profile Status Badge */
.profile-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 20px;
  background: rgba(167, 139, 255, 0.15);
  color: var(--primary-color);
}

.profile-status-badge.status-friends {
  background: rgba(53, 224, 124, 0.15);
  color: var(--accent-green);
}

.profile-status-badge.status-pending {
  background: rgba(167, 139, 255, 0.15);
  color: var(--primary-color);
}

.profile-status-badge.status-blocked {
  background: rgba(120, 28, 34, 0.55);
  color: #ffe2e2;
}

/* Profile Fields */
.profile-fields {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.profile-field {
  background: var(--bg-secondary);
  border: 1px solid var(--stroke);
  border-radius: var(--border-radius);
  padding: 16px;
}

.profile-field-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.profile-field-value {
  font-size: 1rem;
  color: var(--text-color);
}

/* Mutual Friends Section */
.profile-section {
  margin-bottom: 40px;
}

.profile-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mutual-friends-grid {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.mutual-friend-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--stroke);
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: var(--transition);
  width: 100px;
}

.mutual-friend-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.mutual-friend-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.mutual-friend-photo-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
}

.mutual-friend-name {
  font-size: 0.85rem;
  text-align: center;
  color: var(--text-color);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Friends Page */
.friends-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.friends-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.friends-header h1 {
  font-size: 2rem;
  font-weight: 700;
}

/* Friends Search */
.friends-search-section {
  margin-bottom: 24px;
}

.friends-search-form {
  display: flex;
  gap: 12px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--stroke);
  border-radius: var(--border-radius);
  padding: 0 16px;
  transition: var(--transition);
}

.search-input-wrapper:focus-within {
  border-color: var(--primary-color);
  box-shadow: var(--glow-secondary);
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
}

.friends-search-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-color);
  font-size: 1rem;
  padding: 14px 0;
  outline: none;
}

.friends-search-input::placeholder {
  color: var(--text-muted);
}

/* Friends Tabs */
.friends-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--stroke);
  padding-bottom: 0;
  flex-wrap: wrap;
}

.friends-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--transition);
  white-space: nowrap;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

.friends-tab:hover {
  color: var(--text-color);
}

.friends-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-tertiary);
  border-radius: 11px;
}

.tab-count-alert {
  background: var(--secondary-color);
  color: white;
}

/* Friends Section */
.friends-section {
  margin-bottom: 32px;
}

.friends-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pending-dot {
  width: 10px;
  height: 10px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

.pending-highlight {
  background: rgba(167, 139, 255, 0.05);
  border: 1px solid rgba(167, 139, 255, 0.15);
  border-radius: var(--border-radius);
  padding: 20px;
}

/* Friends Grid */
.friends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Friend Card */
.friend-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--stroke);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.friend-card:hover {
  border-color: rgba(167, 139, 255, 0.3);
}

.friend-card-pending {
  border-color: rgba(167, 139, 255, 0.25);
  background: rgba(167, 139, 255, 0.03);
}

.friend-card-blocked {
  opacity: 0.7;
}

.friend-card-photo-link {
  flex-shrink: 0;
}

.friend-card-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.friend-card-photo-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-color);
}

.friend-card-info {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}

.friend-card-name {
  display: block;
  font-weight: 600;
  color: var(--text-color);
  text-decoration: none;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card-name:hover {
  color: var(--primary-color);
}

.friend-card-nickname {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.friend-card-date {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.friend-request-message {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 6px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
  flex-shrink: 0;
  overflow: visible;
}

.friend-card-actions .btn {
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 0.8rem;
}

.friend-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 16px;
  background: rgba(53, 224, 124, 0.15);
  color: var(--accent-green);
}

.friend-status-badge.pending {
  background: rgba(167, 139, 255, 0.15);
  color: var(--primary-color);
}

.friend-status-badge.incoming {
  background: rgba(111, 91, 255, 0.2);
  color: var(--accent-color);
}

.friend-status-badge.blocked {
  background: rgba(120, 28, 34, 0.55);
  color: #ffe2e2;
}

/* Icon Button for Friend Actions */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.2s;
  flex-shrink: 0;
  overflow: visible;
}

.btn-icon:hover {
  transform: scale(1.1);
}

.btn-icon.btn-primary {
  background: var(--primary-color);
  color: #fff;
}

.btn-icon.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-icon svg {
  width: 20px;
  height: 20px;
}

/* Custom Tooltip */
.has-tooltip {
  position: relative;
  overflow: visible !important;
}

.has-tooltip::before,
.has-tooltip::after {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.15s ease,
    visibility 0.15s ease,
    transform 0.15s ease;
  pointer-events: none;
  z-index: 9999;
}

.has-tooltip::before {
  content: attr(data-tooltip);
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  padding: 8px 12px;
  background: #1a1a2e;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.has-tooltip::after {
  content: "";
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  border: 6px solid transparent;
  border-bottom-color: #1a1a2e;
}

.has-tooltip:hover::before,
.has-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Friends Empty State */
.friends-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.friends-empty svg {
  margin-bottom: 16px;
  opacity: 0.5;
}

.friends-empty p {
  margin-bottom: 8px;
}

/* Inline Form Helper */
.inline-form {
  display: inline;
}

/* Button Variants for Profile/Friends */
.profile-container .btn-danger,
.friends-container .btn-danger,
.friends-container-inline .btn-danger {
  color: #ff6b6b !important;
  border-color: rgba(255, 107, 107, 0.3) !important;
}

.profile-container .btn-danger:hover,
.friends-container .btn-danger:hover,
.friends-container-inline .btn-danger:hover {
  background: rgba(255, 107, 107, 0.1) !important;
  border-color: rgba(255, 107, 107, 0.5) !important;
}

/* Privacy Settings */
.privacy-settings {
  background: var(--bg-secondary);
  border: 1px solid var(--stroke);
  border-radius: var(--border-radius);
  padding: 24px;
}

.privacy-settings h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.privacy-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--stroke);
}

.privacy-field:last-child {
  border-bottom: none;
}

.privacy-field-label {
  font-weight: 500;
}

.privacy-field-select {
  min-width: 140px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.9rem;
}

.privacy-field-select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Alert styles */
.alert {
  padding: 14px 18px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.alert-success {
  background: rgba(53, 224, 124, 0.1);
  border: 1px solid rgba(53, 224, 124, 0.3);
  color: var(--accent-green);
}

.alert-error {
  background: rgba(120, 28, 34, 0.55);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #ffe2e2;
}

/* Friend notification badge in nav */
.friend-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--secondary-color);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Profile Responsive */
@media (max-width: 640px) {
  .account-view-profile-btn {
    position: static;
    display: flex;
    width: fit-content;
    margin: 0 0 14px auto;
  }

  .account-title {
    flex-wrap: wrap;
    min-width: 0;
  }

  .account-title-name {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-stats {
    justify-content: center;
  }

  .profile-actions {
    justify-content: center;
  }

  .profile-fields {
    grid-template-columns: 1fr;
  }

  .friends-tabs {
    gap: 0;
  }

  .friends-tab {
    padding: 12px 12px;
    font-size: 0.9rem;
  }

  .friend-card {
    flex-direction: column;
    text-align: center;
  }

  .friend-card-actions {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}
