/* ============================================================
   VELORA — MESSAGES / NOTIFICATIONS / SETTINGS / EXPLORE CSS
   ============================================================ */

/* ============================================================
   MESSAGES
   ============================================================ */
.messages-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  height: calc(100vh - 61px);
  overflow: hidden;
}

/* Conversations panel */
.conversations-panel {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.conversations-panel.hidden-mobile { display: flex; }

.conv-header {
  padding: 1.25rem 1.25rem .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.conv-header h2 { font-size: 1.1rem; font-weight: 700; }

.conv-search {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.conv-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: .875rem;
  width: 100%;
  font-family: inherit;
}
.conv-search input::placeholder { color: var(--text3); }

.conv-list { flex: 1; overflow-y: auto; }

.conv-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1.25rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.conv-item:hover { background: var(--card); }
.conv-item.active { background: rgba(147,51,234,.08); border-left: 3px solid var(--primary); }

.conv-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  flex-shrink: 0;
}
.conv-info { flex: 1; min-width: 0; }
.conv-name-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: .15rem; }
.conv-name { font-size: .9rem; font-weight: 600; }
.conv-time { font-size: .7rem; color: var(--text3); }
.conv-preview { font-size: .8rem; color: var(--text3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-unread {
  background: var(--primary);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 50px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  flex-shrink: 0;
}
.conv-loading { padding: 2rem; text-align: center; color: var(--text3); font-size: .875rem; }
.conv-empty { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 3rem 1rem; color: var(--text3); text-align: center; }
.conv-empty span { font-size: 2.5rem; }

/* Chat panel */
.chat-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text3);
  text-align: center;
  padding: 2rem;
}
.chat-empty-icon { font-size: 4rem; }
.chat-empty h3 { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.chat-empty p { font-size: .9rem; }

.chat-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--bg2);
  flex-shrink: 0;
}
.chat-back { color: var(--text2); display: none; }
.chat-header-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.chat-header-name { font-weight: 700; font-size: .95rem; display: block; }
.chat-header-status { font-size: .75rem; color: var(--success); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.chat-start-msg { text-align: center; color: var(--text3); font-size: .85rem; padding: 1rem; }

.msg-row { display: flex; }
.msg-mine { justify-content: flex-end; }
.msg-theirs { justify-content: flex-start; }

.msg-bubble {
  max-width: 70%;
  padding: .6rem .9rem;
  border-radius: 18px;
  font-size: .9rem;
  line-height: 1.5;
}
.msg-mine .msg-bubble {
  background: var(--grad);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-theirs .msg-bubble {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.msg-bubble p { margin: 0; word-break: break-word; }
.msg-time { font-size: .65rem; opacity: .7; display: block; text-align: right; margin-top: .25rem; }

.chat-input-area {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  flex-shrink: 0;
}
.chat-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 24px;
  padding: .5rem .5rem .5rem 1rem;
  transition: border-color .2s;
}
.chat-input-wrap:focus-within { border-color: var(--primary); }
.chat-input-wrap textarea {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  resize: none;
  max-height: 120px;
  line-height: 1.5;
}
.chat-input-wrap textarea::placeholder { color: var(--text3); }
.chat-send-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: transform .15s;
}
.chat-send-btn:hover { transform: scale(1.1); }

.chat-media-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg2);
  border: 1px solid var(--border);
  color: var(--text3);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: all .15s;
}
.chat-media-btn:hover { border-color: var(--primary); color: var(--primary); }

.msg-media {
  max-width: 220px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: .25rem;
}
.msg-media img,
.msg-media video {
  width: 100%;
  display: block;
  border-radius: 10px;
  cursor: pointer;
}

/* User search results */
.user-search-results { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.user-result {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem .75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s;
}
.user-result:hover { background: var(--card); }
.user-result-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}
.user-result-name { font-size: .875rem; font-weight: 600; display: block; }
.user-result-username { font-size: .775rem; color: var(--text3); }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-tabs {
  display: flex;
  gap: .25rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: .25rem;
}
.notif-tabs::-webkit-scrollbar { display: none; }
.notif-tab {
  padding: .45rem 1rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text2);
  background: var(--card);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: all .2s;
}
.notif-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.notif-list { display: flex; flex-direction: column; gap: .5rem; }

.notif-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s;
  position: relative;
}
.notif-item:hover { border-color: var(--border2); }
.notif-unread { border-left: 3px solid var(--primary); background: rgba(147,51,234,.05); }

.notif-icon-wrap { font-size: 1.5rem; flex-shrink: 0; }
.notif-body { display: flex; align-items: center; gap: .75rem; flex: 1; }
.notif-actor-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  flex-shrink: 0;
}
.notif-text p { font-size: .875rem; color: var(--text2); margin: 0; line-height: 1.5; }
.notif-text strong { color: var(--text); }
.notif-time { font-size: .75rem; color: var(--text3); }
.notif-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
  position: absolute;
  top: 1rem; right: 1rem;
}

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 900px;
}

.settings-tabs {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  position: sticky;
  top: 80px;
}
.settings-tab {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 500;
  color: var(--text2);
  transition: all .2s;
  text-align: left;
}
.settings-tab:hover { background: var(--card); color: var(--text); }
.settings-tab.active { background: rgba(147,51,234,.12); color: var(--text); border-left: 3px solid var(--primary); }
.settings-tab-danger { color: var(--error) !important; }
.settings-tab-danger:hover { background: rgba(239,68,68,.08) !important; }

.settings-content { min-width: 0; }
.settings-section { display: none; }
.settings-section.active { display: block; }
.settings-section-title { font-size: 1.25rem; font-weight: 800; margin-bottom: 1.5rem; }

.settings-form { display: flex; flex-direction: column; gap: 1.25rem; }
.settings-form textarea {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  resize: vertical;
  outline: none;
  width: 100%;
  transition: border-color .2s;
}
.settings-form textarea:focus { border-color: var(--primary); }
.settings-divider { height: 1px; background: var(--border); }

/* Avatar / Cover edit */
.avatar-edit-area { position: relative; margin-bottom: 4rem; }
.cover-edit { position: relative; height: 140px; border-radius: var(--radius); overflow: hidden; background: linear-gradient(135deg,#1a0533,#4a1259); }
.cover-preview { width: 100%; height: 100%; background-size: cover; background-position: center; }
.cover-edit-btn {
  position: absolute;
  bottom: .5rem; right: .5rem;
  background: rgba(0,0,0,.6);
  color: #fff;
  padding: .35rem .75rem;
  border-radius: 50px;
  font-size: .75rem;
  cursor: pointer;
}
.avatar-edit {
  position: absolute;
  bottom: -45px;
  left: 1.5rem;
  width: 80px; height: 80px;
}
.avatar-preview {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--grad);
  border: 3px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  background-size: cover;
  background-position: center;
}
.avatar-edit-btn {
  position: absolute;
  bottom: 0; right: 0;
  width: 26px; height: 26px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  cursor: pointer;
  border: 2px solid var(--bg);
}

/* Notif prefs */
.notif-pref-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.notif-pref-item strong { font-size: .9rem; display: block; }
.notif-pref-item p { font-size: .8rem; color: var(--text3); margin-top: .2rem; }

.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border2);
  border-radius: 24px;
  cursor: pointer;
  transition: background .2s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

/* Danger zone */
.danger-zone { display: flex; flex-direction: column; gap: 1rem; }
.danger-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.danger-item strong { font-size: .9rem; }
.danger-item p { font-size: .8rem; color: var(--text3); margin-top: .25rem; }

/* ============================================================
   EXPLORE
   ============================================================ */
.explore-categories {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: .25rem;
}
.explore-categories::-webkit-scrollbar { display: none; }
.category-btn {
  padding: .45rem 1.25rem;
  border-radius: 50px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text2);
  background: var(--card);
  border: 1px solid var(--border);
  white-space: nowrap;
  transition: all .2s;
}
.category-btn.active { background: var(--grad); color: #fff; border-color: transparent; }
.category-btn:hover:not(.active) { border-color: var(--border2); color: var(--text); }

.explore-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}
.featured-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  height: 180px;
  cursor: pointer;
}
.featured-cover {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
}
.featured-1 .featured-cover { background: linear-gradient(135deg,#1a0533,#9333ea); }
.featured-2 .featured-cover { background: linear-gradient(135deg,#1a0030,#ec4899); }
.featured-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,.9), transparent);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.featured-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  border: 2px solid rgba(255,255,255,.4);
}
.featured-info div { flex: 1; }
.featured-info strong { display: block; font-size: .9rem; color: #fff; }
.featured-info span { font-size: .75rem; color: rgba(255,255,255,.7); }

.explore-section-title { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; color: var(--text2); }

.creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}
.creator-card-explore {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.creator-card-explore:hover { border-color: rgba(147,51,234,.4); transform: translateY(-3px); }
.creator-card-cover { height: 80px; background: linear-gradient(135deg,#1a0533,#4a1259); }
.creator-card-body { padding: 0 1rem 1rem; }
.creator-card-avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--grad);
  border: 3px solid var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.1rem;
  margin-top: -28px;
  margin-bottom: .5rem;
}
.creator-card-name {
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-bottom: .35rem;
}
.creator-verified {
  background: var(--success);
  color: #fff;
  width: 16px; height: 16px;
  border-radius: 50%;
  font-size: .6rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.creator-card-bio { font-size: .8rem; color: var(--text3); margin-bottom: .75rem; line-height: 1.5; }
.creator-card-stats {
  display: flex;
  justify-content: space-between;
  font-size: .775rem;
  color: var(--text3);
  margin-bottom: .75rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .messages-layout { grid-template-columns: 1fr; }
  .chat-panel { position: fixed; inset: 61px 0 0; background: var(--bg); z-index: 10; display: none; }
  .chat-panel.chat-open { display: flex; }
  .conversations-panel.hidden-mobile { display: none; }
  .chat-back { display: flex; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-tabs { flex-direction: row; flex-wrap: wrap; position: static; }
  .explore-featured { grid-template-columns: 1fr; }
}
