/* ÜYE PROFİLİ + TAKİP (2026-10-08) - home.php #profilePage, assets/member-profile.js.
   Tema değişkenlerini (--surface, --line, --text, --muted, --cyan ...) kullanır,
   böylece koyu/açık temada otomatik uyum sağlar. */

/* Site fiilen koyu tema; styles.css'teki --surface/--line gibi değişkenler açık
   değerlerde kaldığı için (dashboard.css yalnız bir kısmını koyulaştırıyor) profil
   kendi sabit koyu paletini kullanır. */
#profilePage, .mp-modal {
  --mp-card: #111b2e;
  --mp-panel: rgba(255, 255, 255, .04);
  --mp-hover: rgba(255, 255, 255, .08);
  --mp-line: rgba(255, 255, 255, .09);
  --mp-line-strong: rgba(148, 163, 184, .4);
  --mp-line-focus: rgba(34, 211, 238, .55);
  --mp-text: #f1f5f9;
  --mp-muted: #94a3b8;
  --mp-cyan: #22d3ee;
  --mp-yellow: #f59e0b;
}

#profilePage .mp-wrap { max-width: 980px; margin: 0 auto; }

.mp-card {
  border: 1px solid var(--mp-line);
  background: var(--mp-card);
  border-radius: 18px;
  overflow: hidden;
}

.mp-cover {
  height: 190px;
  background: linear-gradient(135deg, rgba(6,182,212,.35), rgba(99,102,241,.35)), var(--mp-hover);
  background-size: cover;
  background-position: center;
  position: relative;
}
.mp-cover.mp-has-img { background-blend-mode: normal; }

.mp-head {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px 18px;
  padding: 0 22px;
  margin-top: -52px;
  position: relative;
}

.mp-avatar {
  width: 104px; height: 104px; flex: 0 0 104px;
  border-radius: 50%;
  border: 4px solid var(--mp-card);
  background: #334155 center/cover no-repeat;
  color: #fff; font-weight: 800; font-size: 2.6rem;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
}

.mp-ident { flex: 1 1 220px; min-width: 0; padding-bottom: 6px; }
.mp-name {
  margin: 0; font-size: 1.5rem; line-height: 1.2; color: var(--mp-text);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; word-break: break-word;
}
.mp-since { margin-top: 4px; color: var(--mp-muted); font-size: .86rem; }

.mp-badge {
  font-size: .68rem; font-weight: 800; letter-spacing: .04em;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(245,158,11,.16); color: var(--mp-yellow);
  border: 1px solid rgba(245,158,11,.35);
}
.mp-badge.mp-badge-admin {
  background: rgba(99,102,241,.16); color: #a5b4fc; border-color: rgba(99,102,241,.4);
}

.mp-actions { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 8px; }

.mp-btn {
  appearance: none; cursor: pointer; border-radius: 10px; padding: 10px 18px;
  font: inherit; font-weight: 800; font-size: .9rem; line-height: 1.1;
  border: 1px solid transparent; transition: filter .15s ease, background .15s ease;
}
.mp-btn[disabled] { opacity: .6; cursor: default; }
.mp-btn-primary {
  background: linear-gradient(90deg, #22d3ee, #06b6d4); color: #04111a;
  box-shadow: 0 4px 14px rgba(6,182,212,.28);
}
.mp-btn-primary:hover:not([disabled]) { filter: brightness(1.08); }
.mp-btn-ghost {
  background: transparent; color: var(--mp-text);
  border-color: var(--mp-line-strong);
}
.mp-btn-ghost:hover:not([disabled]) { background: var(--mp-hover); }
.mp-btn-danger { color: #fca5a5; border-color: rgba(239,68,68,.45); background: transparent; }

.mp-bio {
  margin: 14px 22px 0; color: var(--mp-text); font-size: .98rem; line-height: 1.6;
  white-space: pre-line; word-break: break-word;
}
.mp-bio.mp-bio-empty { color: var(--mp-muted); font-style: italic; }

.mp-hidden-note {
  margin: 16px 22px 0; padding: 12px 14px; border-radius: 10px; font-size: .9rem;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.35); color: #fca5a5;
}

.mp-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
  padding: 18px 22px 20px;
}
.mp-stat {
  appearance: none; font: inherit; text-align: center; cursor: default;
  padding: 12px 6px; border-radius: 12px;
  background: var(--mp-panel); border: 1px solid var(--mp-line);
  color: var(--mp-text);
}
button.mp-stat { cursor: pointer; }
button.mp-stat:hover { border-color: var(--mp-line-focus); }
.mp-stat strong { display: block; font-size: 1.35rem; line-height: 1.2; }
.mp-stat span { display: block; margin-top: 2px; font-size: .74rem; color: var(--mp-muted); letter-spacing: .03em; }

.mp-tabs {
  display: flex; gap: 6px; padding: 0 22px; border-top: 1px solid var(--mp-line);
}
.mp-tab {
  appearance: none; background: none; border: none; cursor: pointer; font: inherit;
  padding: 14px 14px 12px; color: var(--mp-muted); font-weight: 700; font-size: .92rem;
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.mp-tab.active { color: var(--mp-cyan); border-bottom-color: var(--mp-cyan); }

.mp-list { padding: 16px 22px 24px; display: grid; gap: 12px; }
.mp-empty { padding: 26px 8px; text-align: center; color: var(--mp-muted); line-height: 1.6; }
.mp-empty .mp-btn { margin-top: 12px; }

.mp-item {
  display: block; width: 100%; text-align: left; font: inherit; cursor: pointer; color: inherit;
  padding: 14px 16px; border-radius: 12px; box-sizing: border-box;
  background: var(--mp-panel); border: 1px solid var(--mp-line);
}
.mp-item:hover { border-color: var(--mp-line-focus); }
.mp-item-title { font-weight: 700; color: var(--mp-text); word-break: break-word; }
.mp-item-meta { margin-top: 6px; color: var(--mp-muted); font-size: .82rem; display: flex; flex-wrap: wrap; gap: 4px 14px; }

.mp-picks { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.mp-pick {
  min-width: 26px; padding: 3px 5px; border-radius: 6px; text-align: center;
  font-size: .74rem; font-weight: 800; color: var(--mp-text);
  background: var(--mp-hover); border: 1px solid var(--mp-line);
}
.mp-pick.mp-multi { color: var(--mp-yellow); }

.mp-nudge {
  margin: 14px 22px 0; padding: 12px 14px; border-radius: 10px; font-size: .88rem; line-height: 1.5;
  background: rgba(6,182,212,.1); border: 1px solid rgba(6,182,212,.3); color: var(--mp-text);
}

.mp-loading, .mp-error { padding: 60px 20px; text-align: center; color: var(--mp-muted); }
.mp-error strong { display: block; color: var(--mp-text); font-size: 1.1rem; margin-bottom: 8px; }

/* Kullanıcı adı bağlantıları (data-profile-link) */
[data-profile-link] { cursor: pointer; }
[data-profile-link]:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Düzenleme formu */
.mp-edit { padding: 0 0 24px; }
.mp-edit .mp-cover { cursor: pointer; }
.mp-edit-body { padding: 18px 22px 0; display: grid; gap: 16px; }
.mp-field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--mp-text); font-size: .9rem; }
.mp-field textarea {
  width: 100%; box-sizing: border-box; min-height: 110px; resize: vertical; padding: 12px 14px; border-radius: 10px;
  background: var(--mp-panel); color: var(--mp-text);
  border: 1px solid var(--mp-line-strong); font: inherit; line-height: 1.5;
}
.mp-field textarea:focus { outline: none; border-color: var(--mp-cyan); }
.mp-hint { margin-top: 6px; color: var(--mp-muted); font-size: .8rem; line-height: 1.5; }
.mp-field .mp-check { display: flex; align-items: center; gap: 10px; margin-bottom: 0; cursor: pointer; }
.mp-check input { width: 18px; height: 18px; flex: 0 0 18px; margin: 0; accent-color: var(--mp-cyan); cursor: pointer; }
.mp-counter { text-align: right; color: var(--mp-muted); font-size: .78rem; margin-top: 4px; }
.mp-edit-row { display: flex; flex-wrap: wrap; gap: 8px; }
.mp-msg { padding: 10px 12px; border-radius: 10px; font-size: .88rem; }
.mp-msg.mp-msg-err { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); color: #fca5a5; }
.mp-file { display: none; }

/* Takipçi / takip listesi penceresi */
.mp-modal {
  position: fixed; inset: 0; z-index: 9600; display: flex; align-items: center; justify-content: center;
  padding: 18px; box-sizing: border-box; background: rgba(3,7,18,.6);
}
.mp-modal-box {
  width: 100%; max-width: 420px; max-height: 80vh; display: flex; flex-direction: column;
  border-radius: 16px; background: var(--mp-card); border: 1px solid var(--mp-line);
  box-shadow: 0 25px 60px rgba(0,0,0,.5);
}
.mp-modal-head {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  border-bottom: 1px solid var(--mp-line); font-weight: 800; color: var(--mp-text);
}
.mp-modal-close { appearance: none; background: none; border: none; color: var(--mp-muted); font-size: 1.3rem; cursor: pointer; }
.mp-modal-list { overflow-y: auto; padding: 8px; }
.mp-person {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px;
  background: none; border: none; font: inherit; color: var(--mp-text); cursor: pointer; text-align: left;
}
.mp-person:hover { background: var(--mp-hover); }
.mp-person .mp-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 1rem; border-width: 0; box-shadow: none; }

@media (max-width: 640px) {
  .mp-cover { height: 130px; }
  .mp-head { padding: 0 14px; margin-top: -44px; }
  .mp-avatar { width: 88px; height: 88px; flex-basis: 88px; font-size: 2.2rem; }
  .mp-name { font-size: 1.25rem; }
  .mp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 16px 14px; }
  .mp-bio, .mp-hidden-note, .mp-nudge { margin-left: 14px; margin-right: 14px; }
  .mp-tabs { padding: 0 8px; }
  .mp-list { padding: 14px; }
  .mp-edit-body { padding: 16px 14px 0; }
  .mp-actions { width: 100%; }
  .mp-actions .mp-btn { flex: 1 1 auto; }
}

/* ANA SAYFA: SOHBET (sol, daraltildi) + EN COK TAKIP EDILENLER (sag) - 2026-10-08.
   Sag kart "contain: size" ile satir yuksekligini BELIRLEMEZ: satirin yuksekligi sohbete
   gore kalir, kart ayni boyuta gerilir ve liste kendi icinde kayar. Kart genisligine gore
   (container query) dar alanda sohbetin altina iner. */
.home-chat-wrap {
  container-type: inline-size;
  container-name: chatrow;
  margin-top: 24px;
}
.home-chat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
}
.home-chat-row > .home-chat-section { margin-top: 0; min-width: 0; }

.top-followed-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 360px;
  contain: size;
  box-sizing: border-box;
  padding: 18px 16px 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.tf-head { padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.tf-title { color: #fff; font-weight: 800; font-size: 0.95rem; }
.tf-tabs { display: flex; gap: 4px; padding: 3px; background: rgba(255, 255, 255, 0.05); border-radius: 12px; }
.tf-tab {
  flex: 1 1 0;
  min-width: 0;
  padding: 8px 6px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-weight: 800;
  font-size: 0.8rem;
  white-space: nowrap;
  cursor: pointer;
}
.tf-tab:hover { color: #e2e8f0; }
.tf-tab.is-active { background: rgba(52, 211, 153, 0.16); color: #34d399; box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.35); }
.tf-subtabs { display: flex; gap: 6px; margin-top: 8px; }
.tf-subtabs[hidden] { display: none; }
.tf-sub {
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-weight: 700;
  font-size: 0.72rem;
  cursor: pointer;
}
.tf-sub:hover { color: #e2e8f0; border-color: rgba(255, 255, 255, 0.28); }
.tf-sub.is-active { background: #34d399; border-color: #34d399; color: #04261b; }
.tf-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 0; display: flex; flex-direction: column; gap: 2px; }
.tf-empty { padding: 28px 8px; text-align: center; color: #94a3b8; font-size: 0.85rem; line-height: 1.5; }
.tf-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border-radius: 10px;
  background: none;
  border: none;
  color: #f1f5f9;
  font: inherit;
  text-align: left;
  cursor: pointer;
  flex-shrink: 0;
}
.tf-row:hover { background: rgba(255, 255, 255, 0.07); }
.tf-rank { width: 26px; flex: 0 0 26px; text-align: center; color: #94a3b8; font-weight: 800; font-size: 0.85rem; }
.tf-row .mp-avatar { width: 34px; height: 34px; flex: 0 0 34px; border: 0; box-shadow: none; font-size: 0.95rem; }
.tf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; font-size: 0.88rem; }
.tf-name i { font-style: normal; }
.tf-count { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15; }
.tf-count b { color: #34d399; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.tf-count small { color: #94a3b8; font-size: 0.62rem; }
.tf-note { margin: 6px 0 0; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, 0.06); color: #64748b; font-size: 0.68rem; line-height: 1.4; }

@container chatrow (max-width: 820px) {
  .home-chat-row { grid-template-columns: minmax(0, 1fr); }
  .top-followed-card { contain: none; min-height: 0; }
  .tf-list { overflow: visible; }
}
