/**
 * MyTunes Social Platform — Profiles CSS
 * Session 3 — profiles.css
 *
 * Brand: Deep Violet #2D1B69 | Warm Amber #F97316 | Electric Cyan #06B6D4
 * Near-black: #0F0A1E | Surface: #1A1035 | Electric White: #F8FAFC
 * Font: Space Grotesk + Inter
 *
 * Covers:
 *  - Profile header (avatar, bio, stats, follow button)
 *  - Follow button states (following/not/hover)
 *  - Profile tabs
 *  - Tracks grid (3-col desktop, 1-col mobile)
 *  - Pinned track badge
 *  - Edit bio inline (contenteditable styling)
 *  - Avatar upload hover state
 *  - Publish modal (dark overlay, centered card)
 *  - Privacy dropdown (custom styled)
 *  - Followers/Following modal (slide-up sheet)
 *  - Notification bell + badge
 *  - Notification panel (slide-in, 380px wide)
 *  - Notification items (unread vs read)
 *  - Save request list (approve/deny buttons)
 *  - Toast notifications (bottom-center, auto-dismiss)
 *  - Responsive: mobile breakpoint 768px
 */

/* ─── CSS Variables ─────────────────────────────────────────────────────────── */
:root {
  --profile-deep-violet:     #2D1B69;
  --profile-warm-amber:      #F97316;
  --profile-electric-cyan:   #06B6D4;
  --profile-near-black:      #0F0A1E;
  --profile-surface:         #1A1035;
  --profile-surface-2:       #221540;
  --profile-electric-white:  #F8FAFC;
  --profile-muted:           rgba(248, 250, 252, 0.55);
  --profile-border:          rgba(45, 27, 105, 0.55);
  --profile-card-glow:       0 4px 24px rgba(45, 27, 105, 0.45);
  --profile-radius:          12px;
  --profile-radius-sm:       8px;
  --profile-font-heading:    'Space Grotesk', sans-serif;
  --profile-font-body:       'Inter', sans-serif;
}

/* ─── Profile Page Container ─────────────────────────────────────────────────── */
#profile-page-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--profile-near-black);
  z-index: 400;
  overflow-y: auto;
  display: none;
}

.profile-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 0 80px 0;
}

.profile-page-back {
  padding: 16px 16px 0;
}

.profile-back-btn {
  background: none;
  border: 1px solid var(--profile-border);
  color: var(--profile-electric-white);
  font-family: var(--profile-font-body);
  font-size: 14px;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.profile-back-btn:hover {
  background: var(--profile-surface);
  border-color: var(--profile-warm-amber);
  color: var(--profile-warm-amber);
}

/* ─── Profile Header ─────────────────────────────────────────────────────────── */
.profile-header {
  position: relative;
  padding: 0 0 20px 0;
  margin-bottom: 8px;
}

.profile-header-bg {
  height: 140px;
  background: linear-gradient(135deg, #1A0F3D 0%, var(--profile-deep-violet) 60%, #3D1A6E 100%);
  border-radius: 0 0 var(--profile-radius) var(--profile-radius);
}

.profile-header-content {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0 20px;
  margin-top: -48px;
  position: relative;
  z-index: 1;
}

/* ─── Avatar ─────────────────────────────────────────────────────────────────── */
.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  border: 3px solid var(--profile-near-black);
  background: var(--profile-surface);
  overflow: hidden;
}

.profile-avatar-wrap:hover .profile-avatar-overlay {
  opacity: 1;
}

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

.profile-avatar-initials {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--profile-deep-violet), #5B21B6);
  color: var(--profile-electric-white);
  font-family: var(--profile-font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.profile-avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 10, 30, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  opacity: 0;
  transition: opacity 0.2s;
  border-radius: 50%;
}

/* ─── Header Info ────────────────────────────────────────────────────────────── */
.profile-header-info {
  flex: 1;
  padding-bottom: 4px;
}

.profile-username {
  font-family: var(--profile-font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--profile-electric-white);
  line-height: 1.2;
  margin-bottom: 6px;
}

.profile-bio-wrap {
  position: relative;
}

.profile-bio {
  font-family: var(--profile-font-body);
  font-size: 14px;
  color: rgba(248, 250, 252, 0.80);
  line-height: 1.5;
  word-break: break-word;
  min-height: 20px;
  border-radius: var(--profile-radius-sm);
  padding: 4px 6px;
  margin-left: -6px;
  transition: background 0.15s;
}

.profile-bio:focus {
  outline: none;
  background: rgba(45, 27, 105, 0.35);
  border: 1px solid var(--profile-deep-violet);
}

.profile-bio:empty::before {
  content: attr(data-placeholder);
  color: var(--profile-muted);
  pointer-events: none;
}

.profile-bio-counter {
  font-family: var(--profile-font-body);
  font-size: 11px;
  color: var(--profile-muted);
  margin-top: 2px;
  margin-left: 6px;
}

.profile-bio-save-btn {
  background: var(--profile-warm-amber);
  color: white;
  border: none;
  font-family: var(--profile-font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 16px;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity 0.15s;
}
.profile-bio-save-btn:hover { opacity: 0.85; }

.profile-join-date {
  font-family: var(--profile-font-body);
  font-size: 12px;
  color: var(--profile-muted);
  margin-top: 4px;
}

/* ─── Actions Row ────────────────────────────────────────────────────────────── */
.profile-actions-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 20px 0;
  flex-wrap: wrap;
}

/* ─── Stats (own profile only) ───────────────────────────────────────────────── */
.profile-stats-row {
  display: flex;
  gap: 20px;
  align-items: center;
}

.profile-stat-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  gap: 2px;
  transition: opacity 0.15s;
}
.profile-stat-btn:hover { opacity: 0.75; }

.profile-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.profile-stat-num {
  font-family: var(--profile-font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--profile-electric-white);
}

.profile-stat-label {
  font-family: var(--profile-font-body);
  font-size: 11px;
  color: var(--profile-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── Buttons Row ────────────────────────────────────────────────────────────── */
.profile-btn-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

/* ─── Follow Button ──────────────────────────────────────────────────────────── */
.profile-follow-btn {
  background: var(--profile-warm-amber);
  color: white;
  border: 2px solid var(--profile-warm-amber);
  font-family: var(--profile-font-heading);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.1s;
  white-space: nowrap;
}

.profile-follow-btn:hover {
  background: #ea6e0e;
  transform: translateY(-1px);
}

.profile-follow-btn--following {
  background: transparent;
  color: var(--profile-warm-amber);
  border-color: var(--profile-warm-amber);
}

.profile-follow-btn--following:hover {
  background: rgba(249, 115, 22, 0.12);
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.profile-follow-btn--sm {
  padding: 5px 14px;
  font-size: 12px;
}

/* ─── Edit / Secondary Buttons ───────────────────────────────────────────────── */
.profile-edit-btn {
  background: var(--profile-surface);
  color: var(--profile-electric-white);
  border: 1px solid var(--profile-border);
  font-family: var(--profile-font-body);
  font-size: 13px;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.profile-edit-btn:hover {
  border-color: var(--profile-warm-amber);
  background: rgba(249, 115, 22, 0.08);
}

.profile-btn-primary {
  background: var(--profile-warm-amber);
  color: white;
  border: none;
  font-family: var(--profile-font-heading);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border-radius: 24px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.profile-btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }
.profile-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.profile-btn-secondary {
  background: var(--profile-surface);
  color: var(--profile-electric-white);
  border: 1px solid var(--profile-border);
  font-family: var(--profile-font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 24px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.profile-btn-secondary:hover { border-color: var(--profile-muted); }

/* ─── More Menu ──────────────────────────────────────────────────────────────── */
.profile-more-wrap {
  position: relative;
}

.profile-more-btn {
  background: var(--profile-surface);
  color: var(--profile-electric-white);
  border: 1px solid var(--profile-border);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s;
}
.profile-more-btn:hover { border-color: var(--profile-warm-amber); }

.profile-more-menu {
  position: absolute;
  top: 42px;
  right: 0;
  background: var(--profile-surface-2);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius-sm);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 200;
  min-width: 160px;
  overflow: hidden;
}

.profile-more-menu button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--profile-electric-white);
  font-family: var(--profile-font-body);
  font-size: 14px;
  text-align: left;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.profile-more-menu button:hover { background: rgba(249, 115, 22, 0.1); }

/* ─── Pinned Track Section ───────────────────────────────────────────────────── */
.profile-pinned-section {
  padding: 16px 20px;
  border-bottom: 1px solid var(--profile-border);
}

.profile-pinned-label {
  font-family: var(--profile-font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--profile-warm-amber);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.profile-pin-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--profile-warm-amber);
  color: white;
  font-family: var(--profile-font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  z-index: 2;
}

/* ─── Profile Tabs ───────────────────────────────────────────────────────────── */
.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--profile-border);
  padding: 0 20px;
  margin-top: 16px;
  position: sticky;
  top: 0;
  background: var(--profile-near-black);
  z-index: 10;
}

.profile-tab {
  background: none;
  border: none;
  color: var(--profile-muted);
  font-family: var(--profile-font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}
.profile-tab:hover { color: var(--profile-electric-white); }
.profile-tab--active {
  color: var(--profile-electric-white);
  border-bottom-color: var(--profile-warm-amber);
  font-weight: 600;
}

.profile-tab-content {
  display: none;
  padding: 20px;
}
.profile-tab-content--active { display: block; }

/* ─── Tracks Grid (3 col desktop, 1 col mobile) ──────────────────────────────── */
.profile-tracks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .profile-tracks-grid { grid-template-columns: 1fr; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .profile-tracks-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Track Card (Profile Grid) ──────────────────────────────────────────────── */
.profile-track-card {
  background: var(--profile-surface);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.profile-track-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--profile-card-glow);
}

.profile-track-cover {
  position: relative;
  width: 100%;
  padding-top: 100%; /* 1:1 aspect ratio */
  background: linear-gradient(135deg, var(--profile-deep-violet), var(--profile-surface));
  overflow: hidden;
}

.profile-track-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(249, 115, 22, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s, transform 0.15s;
}
.profile-track-card:hover .profile-track-play { opacity: 1; }
.profile-track-play:hover { transform: translate(-50%, -50%) scale(1.1); }

.profile-track-menu-wrap {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
}

.profile-track-more {
  background: rgba(15, 10, 30, 0.7);
  color: white;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}
.profile-track-card:hover .profile-track-more { opacity: 1; }

.profile-track-menu {
  position: absolute;
  top: 32px;
  right: 0;
  background: var(--profile-surface-2);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius-sm);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  min-width: 160px;
  z-index: 10;
  overflow: hidden;
}

.profile-track-menu button {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--profile-electric-white);
  font-family: var(--profile-font-body);
  font-size: 13px;
  text-align: left;
  padding: 9px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.profile-track-menu button:hover { background: rgba(249, 115, 22, 0.1); }
.profile-track-menu button.danger { color: #ef4444; }
.profile-track-menu button.danger:hover { background: rgba(239, 68, 68, 0.1); }

.profile-track-info {
  padding: 10px 12px;
}

.profile-track-title {
  font-family: var(--profile-font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--profile-electric-white);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-track-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.profile-genre-tag {
  background: var(--profile-deep-violet);
  color: var(--profile-electric-white);
  font-family: var(--profile-font-body);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-artist-tag {
  background: rgba(6, 182, 212, 0.15);
  color: var(--profile-electric-cyan);
  font-family: var(--profile-font-body);
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 10px;
}

.profile-privacy-tag {
  background: rgba(248, 250, 252, 0.1);
  color: var(--profile-muted);
  font-family: var(--profile-font-body);
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 10px;
}

.profile-viral-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}

.profile-vibe-badge {
  background: rgba(249, 115, 22, 0.15);
  color: var(--profile-warm-amber);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
}

.profile-track-date {
  font-family: var(--profile-font-body);
  font-size: 11px;
  color: var(--profile-muted);
}

/* ─── Empty States ───────────────────────────────────────────────────────────── */
.profile-empty-tracks {
  text-align: center;
  padding: 48px 20px;
}

.profile-empty-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.profile-empty-text {
  font-family: var(--profile-font-body);
  font-size: 15px;
  color: var(--profile-muted);
  margin-bottom: 20px;
}

.profile-empty-state {
  text-align: center;
  padding: 24px;
  color: var(--profile-muted);
  font-family: var(--profile-font-body);
  font-size: 14px;
}

.profile-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 40vh;
  gap: 12px;
}

.profile-error-emoji { font-size: 48px; }
.profile-error-text {
  font-family: var(--profile-font-body);
  font-size: 16px;
  color: var(--profile-muted);
}

/* ─── Load More ──────────────────────────────────────────────────────────────── */
.profile-load-more {
  text-align: center;
  padding: 20px;
  grid-column: 1 / -1;
}

.profile-load-more-btn {
  background: var(--profile-surface);
  color: var(--profile-electric-white);
  border: 1px solid var(--profile-border);
  font-family: var(--profile-font-body);
  font-size: 13px;
  padding: 9px 24px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.profile-load-more-btn:hover {
  border-color: var(--profile-warm-amber);
  background: rgba(249, 115, 22, 0.08);
}

/* ─── About Tab ──────────────────────────────────────────────────────────────── */
.profile-about-section { max-width: 560px; }

.profile-about-bio {
  font-family: var(--profile-font-body);
  font-size: 15px;
  color: var(--profile-electric-white);
  line-height: 1.7;
  margin-bottom: 12px;
}
.profile-about-bio--empty { color: var(--profile-muted); font-style: italic; }

.profile-about-joindate {
  font-family: var(--profile-font-body);
  font-size: 13px;
  color: var(--profile-muted);
}

/* ─── Settings Tab ───────────────────────────────────────────────────────────── */
.profile-settings-section { max-width: 480px; padding: 8px 0; }

.profile-settings-heading {
  font-family: var(--profile-font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--profile-electric-white);
  margin-bottom: 6px;
}

.profile-settings-desc {
  font-family: var(--profile-font-body);
  font-size: 13px;
  color: var(--profile-muted);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ─── Modal Overlay ──────────────────────────────────────────────────────────── */
.profile-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 30, 0.80);
  backdrop-filter: blur(4px);
  z-index: 600;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 769px) {
  .profile-modal-overlay {
    align-items: center;
    padding: 16px;
  }
}

.profile-modal-sheet {
  background: var(--profile-surface);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius) var(--profile-radius) 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -8px 48px rgba(45, 27, 105, 0.5);
  animation: slideUp 0.25s ease-out;
}

@media (min-width: 769px) {
  .profile-modal-sheet {
    border-radius: var(--profile-radius);
    box-shadow: 0 16px 64px rgba(0,0,0,0.6);
    animation: fadeScaleIn 0.2s ease-out;
  }
}

.profile-modal-sheet--publish { max-width: 600px; }

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

@keyframes fadeScaleIn {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.profile-modal-header {
  display: flex;
  align-items: center;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--profile-border);
  gap: 12px;
}

.profile-modal-title {
  font-family: var(--profile-font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--profile-electric-white);
  flex: 1;
  margin: 0;
}

.profile-modal-close {
  background: none;
  border: none;
  color: var(--profile-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: color 0.15s, background 0.15s;
}
.profile-modal-close:hover {
  color: var(--profile-electric-white);
  background: rgba(248, 250, 252, 0.1);
}

.profile-modal-body {
  padding: 16px 20px;
}

.profile-modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--profile-border);
}

/* ─── Publish Modal — Form Styles ────────────────────────────────────────────── */
.profile-form-group { margin-bottom: 18px; }

.profile-form-label {
  display: block;
  font-family: var(--profile-font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--profile-electric-white);
  margin-bottom: 6px;
}

.profile-form-hint {
  color: var(--profile-muted);
  font-weight: 400;
}

.profile-form-input {
  width: 100%;
  background: var(--profile-surface-2);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius-sm);
  color: var(--profile-electric-white);
  font-family: var(--profile-font-body);
  font-size: 14px;
  padding: 10px 14px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.profile-form-input:focus {
  outline: none;
  border-color: var(--profile-warm-amber);
}

.profile-form-textarea {
  width: 100%;
  background: var(--profile-surface-2);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius-sm);
  color: var(--profile-electric-white);
  font-family: var(--profile-font-body);
  font-size: 14px;
  padding: 10px 14px;
  box-sizing: border-box;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s;
}
.profile-form-textarea:focus {
  outline: none;
  border-color: var(--profile-warm-amber);
}

.profile-form-counter {
  font-family: var(--profile-font-body);
  font-size: 11px;
  color: var(--profile-muted);
  text-align: right;
  margin-top: 3px;
}

/* ─── Privacy Selector ───────────────────────────────────────────────────────── */
.profile-privacy-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (max-width: 480px) {
  .profile-privacy-options { grid-template-columns: 1fr; }
}

.profile-privacy-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--profile-surface-2);
  border: 2px solid var(--profile-border);
  border-radius: var(--profile-radius-sm);
  padding: 10px 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.profile-privacy-option:hover {
  border-color: var(--profile-muted);
}
.profile-privacy-option--selected {
  border-color: var(--profile-warm-amber);
  background: rgba(249, 115, 22, 0.08);
}

.profile-privacy-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.profile-privacy-text {
  font-family: var(--profile-font-body);
  font-size: 13px;
  color: var(--profile-electric-white);
  font-weight: 500;
}

/* ─── Followers / Following Modal List ───────────────────────────────────────── */
.profile-follower-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(45, 27, 105, 0.3);
  gap: 12px;
}
.profile-follower-item:last-child { border-bottom: none; }

.profile-follower-info {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  flex: 1;
}
.profile-follower-info:hover .profile-follower-name { color: var(--profile-warm-amber); }

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

.profile-mini-avatar-initials {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--profile-deep-violet), #5B21B6);
  color: var(--profile-electric-white);
  font-family: var(--profile-font-heading);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-follower-name {
  font-family: var(--profile-font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--profile-electric-white);
  transition: color 0.15s;
}

/* ─── Save Request Items ─────────────────────────────────────────────────────── */
.profile-save-req-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(45, 27, 105, 0.3);
}
.profile-save-req-item:last-child { border-bottom: none; }

.profile-save-req-info { flex: 1; }

.profile-save-req-title {
  font-family: var(--profile-font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--profile-electric-white);
  margin-bottom: 3px;
}

.profile-save-req-requester {
  font-family: var(--profile-font-body);
  font-size: 12px;
  color: var(--profile-electric-cyan);
  margin-bottom: 2px;
}

.profile-save-req-message {
  font-family: var(--profile-font-body);
  font-size: 12px;
  color: var(--profile-muted);
  font-style: italic;
  margin: 4px 0;
}

.profile-save-req-date {
  font-family: var(--profile-font-body);
  font-size: 11px;
  color: var(--profile-muted);
}

.profile-save-req-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.profile-btn-approve {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-family: var(--profile-font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.profile-btn-approve:hover { background: rgba(34, 197, 94, 0.25); }

.profile-btn-deny {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  font-family: var(--profile-font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}
.profile-btn-deny:hover { background: rgba(239, 68, 68, 0.22); }

.profile-save-req-status {
  font-family: var(--profile-font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: capitalize;
}
.profile-save-req-status--approved {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}
.profile-save-req-status--denied {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}
.profile-save-req-status--pending {
  background: rgba(249, 115, 22, 0.12);
  color: var(--profile-warm-amber);
}

/* ─── Notification Bell ──────────────────────────────────────────────────────── */
.notif-bell-wrap {
  position: relative;
  display: inline-flex;
}

.notif-bell-btn {
  position: relative;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.15s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-bell-btn:hover {
  background: rgba(248, 250, 252, 0.1);
  transform: scale(1.1);
}

.notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--profile-warm-amber);
  color: white;
  font-family: var(--profile-font-body);
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--profile-near-black);
  line-height: 1;
}

/* ─── Notification Panel ─────────────────────────────────────────────────────── */
#notification-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 550;
  height: 100%;
  pointer-events: none;
}
#notification-panel.open { display: block; }

.notif-panel {
  position: absolute;
  top: 56px;
  right: 8px;
  width: 380px;
  max-width: calc(100vw - 16px);
  background: var(--profile-surface);
  border: 1px solid var(--profile-border);
  border-radius: var(--profile-radius);
  box-shadow: 0 12px 48px rgba(0,0,0,0.65);
  overflow: hidden;
  animation: slideDown 0.2s ease-out;
  pointer-events: all;
  max-height: calc(100vh - 80px);
  display: flex;
  flex-direction: column;
}

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

.notif-panel-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  pointer-events: all;
  z-index: -1;
}

.notif-panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--profile-border);
  flex-shrink: 0;
}

.notif-panel-title {
  font-family: var(--profile-font-heading);
  font-size: 15px;
  font-weight: 700;
  color: var(--profile-electric-white);
  flex: 1;
}

.notif-mark-all-btn {
  background: none;
  border: 1px solid var(--profile-border);
  color: var(--profile-muted);
  font-family: var(--profile-font-body);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.notif-mark-all-btn:hover {
  color: var(--profile-electric-white);
  border-color: var(--profile-muted);
}

.notif-panel-close {
  background: none;
  border: none;
  color: var(--profile-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}
.notif-panel-close:hover { color: var(--profile-electric-white); }

.notif-panel-body {
  overflow-y: auto;
  flex: 1;
}

/* ─── Notification Items ─────────────────────────────────────────────────────── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(45, 27, 105, 0.25);
  cursor: pointer;
  transition: background 0.15s;
  background: transparent;
}
.notif-item:last-of-type { border-bottom: none; }
.notif-item:hover { background: rgba(45, 27, 105, 0.2); }

.notif-item--unread {
  background: rgba(45, 27, 105, 0.35);
}
.notif-item--unread:hover { background: rgba(45, 27, 105, 0.45); }

.notif-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.notif-text-wrap { flex: 1; }

.notif-text {
  font-family: var(--profile-font-body);
  font-size: 13px;
  color: var(--profile-electric-white);
  line-height: 1.5;
}

.notif-text b {
  font-weight: 600;
  color: var(--profile-electric-white);
}

.notif-time {
  font-family: var(--profile-font-body);
  font-size: 11px;
  color: var(--profile-muted);
  margin-top: 2px;
}

.notif-empty, .notif-loading, .notif-error {
  text-align: center;
  padding: 32px 16px;
  font-family: var(--profile-font-body);
  font-size: 14px;
  color: var(--profile-muted);
}

.notif-load-more {
  text-align: center;
  padding: 12px;
}

/* ─── Skeleton Loaders ───────────────────────────────────────────────────────── */
.profile-skeleton { padding: 20px; }

.profile-skeleton-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.skel {
  background: linear-gradient(90deg, var(--profile-surface) 25%, var(--profile-surface-2) 50%, var(--profile-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--profile-radius-sm);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skel-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skel-line { height: 14px; }
.skel-line--lg  { width: 40%; }
.skel-line--md  { width: 65%; }
.skel-line--sm  { width: 30%; }

.profile-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.skel-card {
  height: 180px;
  border-radius: var(--profile-radius);
}

@media (max-width: 768px) {
  .profile-skeleton-grid { grid-template-columns: 1fr; }
  .skel-card { height: 100px; }
}

/* ─── Loading / Error states ─────────────────────────────────────────────────── */
.profile-loading-dots {
  text-align: center;
  padding: 24px;
  color: var(--profile-muted);
  font-family: var(--profile-font-body);
  font-size: 14px;
}

/* ─── Toast Notifications ────────────────────────────────────────────────────── */
.profile-toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.profile-toast {
  background: var(--profile-surface-2);
  border: 1px solid var(--profile-border);
  color: var(--profile-electric-white);
  font-family: var(--profile-font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
  max-width: 360px;
  text-align: center;
  pointer-events: all;
}

.profile-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.profile-toast--success { border-color: rgba(34, 197, 94, 0.4); }
.profile-toast--error   { border-color: rgba(239, 68, 68, 0.4); background: #200f0f; }
.profile-toast--info    { border-color: rgba(6, 182, 212, 0.3); }

/* ─── Responsive Adjustments ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .profile-header-content {
    flex-direction: column;
    align-items: flex-start;
    margin-top: -44px;
  }

  .profile-actions-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .profile-stats-row {
    gap: 20px;
  }

  .profile-btn-row {
    margin-left: 0;
  }

  .notif-panel {
    top: 56px;
    right: 0;
    width: 100vw;
    border-radius: var(--profile-radius) var(--profile-radius) 0 0;
  }

  .profile-tab { padding: 10px 14px; font-size: 13px; }

  .profile-tab-content { padding: 14px 12px; }
}
