/* Profil sayfası: kapak, avatar, formlar, sekmeler */
.profil-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  min-width: 0;
}

.profil-cover {
  height: 200px;
  background: var(--border);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  margin-bottom: -50px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}
.profil-cover-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.profil-cover-form {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.profil-hidden-input { position: absolute; width: 0; height: 0; opacity: 0; }
/* Kapak üzerinde sadece hover'da kamera ikonu */
.profil-cover-camera {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  color: #fff;
  opacity: 0;
  transition: opacity .2s ease;
  cursor: pointer;
}
.profil-cover:hover .profil-cover-camera {
  opacity: 1;
}
.profil-cover-camera i {
  font-size: 1.75rem;
}
.profil-ayarlar-btn { min-width: 36px; padding: 0.4rem 0.6rem; }
.profil-ayarlar-btn i { font-size: 1.1rem; }

.profil-header {
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.profil-secim-logos {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.profil-secim-logo { display: block; width: 48px; height: 48px; object-fit: contain; }
.profil-secim-logo-alay,
.profil-secim-logo-kus { width: 48px; height: 48px; object-fit: contain; }
.profil-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.profil-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-card);
  display: block;
  background: var(--border);
}
.profil-avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  border: 4px solid var(--bg-card);
}
.profil-avatar-actions { width: 100%; }
.profil-avatar-form {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.profil-avatar-label { cursor: pointer; display: block; }
.profil-avatar-label:hover .profil-avatar { opacity: 0.9; }
.profil-avatar-label:hover .profil-avatar-placeholder { opacity: 0.9; }
.profil-upload-hint.error { text-align: center; }

.profil-info {
  flex: 1;
  min-width: 0;
  max-width: 100%;
}
.profil-username { margin: 0 0 0.25rem; font-size: 1.5rem; font-weight: 700; word-break: break-word; }
.profil-username-link { color: inherit; text-decoration: none; }
.profil-username-link:hover { color: var(--accent); text-decoration: underline; }
.profil-badge { display: inline-block; margin-left: 0.35rem; padding: 0.15rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; }
.profil-badge-vip { background: var(--accent); color: #fff; }
.profil-badge-rank { background: var(--border); color: var(--text); }
.profil-cumleler-block { margin: 1rem 0; padding: 1rem; background: var(--bg-page); border: 1px solid var(--border); border-radius: 8px; }
.profil-cumleler-title { margin: 0 0 0.75rem; font-size: 1rem; }
.profil-cumle-form { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.profil-cumle-input { flex: 1; min-width: 200px; padding: 0.5rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; }
.profil-cumleler-list { list-style: none; margin: 0; padding: 0; }
.profil-cumle-item { margin-bottom: 0.75rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.profil-cumle-item:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.profil-cumle-metin { margin: 0 0 0.25rem; font-style: italic; }
.profil-cumle-meta { font-size: 0.85rem; color: var(--text-muted); }
.profil-cumleler-empty { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.profil-bio-block { margin: 0.5rem 0; }
.profil-bio-display {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.profil-bio { margin: 0; color: var(--text-muted); font-size: 0.95rem; line-height: 1.5; word-break: break-word; }
.profil-bio-edit {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 0.25rem;
  flex-shrink: 0;
}
.profil-bio-form textarea { width: 100%; max-width: 100%; padding: 0.5rem; border-radius: 8px; border: 1px solid var(--border); font: inherit; resize: vertical; }
.profil-bio-form-actions { margin-top: 0.5rem; display: flex; gap: 0.5rem; }
.profil-header-actions { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.profil-arkadas-inline { display: inline-block; margin-right: 0.5rem; }
.profil-arkadas-badge { color: var(--text-muted); font-size: 0.95rem; }
.profil-arkadas-pending { color: var(--text-muted); font-size: 0.95rem; }
.profil-mesaj-btn { min-width: 28px; padding: 0.3rem 0.5rem; }
.profil-mesaj-btn i { font-size: 0.85rem; }
.profil-mesajlar-btn { display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none; }
.profil-mesajlar-btn i { font-size: 0.9rem; }
.profil-arkadas-ekle-btn { min-width: 28px; padding: 0.3rem 0.5rem; }
.profil-arkadas-ekle-btn i { font-size: 0.85rem; }
.profil-arkadas-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0; }
.profil-arkadas-list-item { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
.profil-arkadas-list-item:last-child { border-bottom: none; }
.profil-arkadas-list a { display: flex; align-items: center; gap: 0.5rem; color: var(--text); text-decoration: none; flex: 1; min-width: 0; }
.profil-arkadas-list a:hover { color: var(--accent); }
.profil-arkadas-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }
.profil-arkadas-action-form { margin: 0; }
.profil-arkadas-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.profil-arkadas-placeholder { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.profil-stats {
  display: flex;
  gap: 1.5rem;
  margin: 0.75rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.profil-stats strong {
  color: var(--text);
}

.profil-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  min-width: 0;
  white-space: nowrap;
}
.profil-tabs::-webkit-scrollbar { height: 6px; }
.profil-tabs::-webkit-scrollbar-track { background: var(--border); border-radius: 3px; }
.profil-tabs::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
.profil-tab {
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  font-weight: 500;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  white-space: nowrap;
}
.profil-tab:hover {
  color: var(--text);
}
.profil-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.profil-content {
  min-height: 200px;
  min-width: 0;
  overflow-x: hidden;
}
.profil-pane {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.profil-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}
.profil-empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}
.profil-feed-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Profil şiir/yazı liste görünümü (taşma önleme) */
.profil-eser-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.profil-eser-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: visible;
  position: relative;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.profil-eser-list-item:last-child { border-bottom: none; }
.profil-eser-list-link {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  display: block;
  line-height: 1.4;
}
.profil-eser-list-link:hover { color: var(--accent); text-decoration: underline; }
.profil-eser-list-meta {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Profil: Yorumlar – şiir / yazı ayrı bölümler */
.profil-yorum-bolumleri { display: flex; flex-direction: column; gap: 1.5rem; }
.profil-yorum-bolum { margin: 0; }
.profil-yorum-bolum-baslik { font-size: 1rem; font-weight: 600; margin: 0 0 0.5rem 0; color: var(--text); }
.profil-yorum-bos { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

.profil-eser-list-actions {
  flex-shrink: 0;
  display: flex;
  gap: 0.35rem;
  overflow: visible;
  margin-left: 0.5rem;
}
.profil-eser-list-actions .feed-pasif-btn,
.profil-eser-list-actions .feed-arsiv-btn {
  padding: 0.2rem 0.5rem;
  font-size: 0.8rem;
}

/* Tek eser sayfası (profil içinde açılan) */
.profil-single-eser-wrap {
  margin-top: 0.5rem;
}
.profil-eser-back {
  margin-bottom: 1rem;
}
.profil-eser-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.profil-eser-back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg);
}
.profil-eser-back-link i {
  font-size: 0.85rem;
}
.profil-single-eser-card {
  margin-top: 0;
}

/* Hata mesajı (avatar/cover yükleme) */
.profil-upload-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.profil-upload-hint.error {
  color: #dc3545;
}

/* Profil engelli / sadece arkadaşlar mesajları */
.profil-engelli {
  padding-top: 2rem;
}
.profil-engelli-box {
  text-align: center;
  padding: 2rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
}
.profil-engelli-mesaj {
  margin: 0 0 1rem;
  color: var(--text-muted);
}
.profil-sadece-arkadaslar {
  padding: 1.5rem;
  background: var(--bg-card);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.profil-sadece-arkadaslar-mesaj {
  margin: 0;
  color: var(--text-muted);
  text-align: center;
}

/* Künye: üyelik tarihi, son görülme */
.profil-kunye {
  margin: 5px 0 0.35rem;
  font-size: 0.9rem;
  color: var(--text);
}
.profil-uyelik { margin-bottom: 0.15rem; }
.profil-son-gorulme { margin-bottom: 0.5rem; font-weight: 500; }

/* Çevrimiçi / çevrimdışı göstergesi (avatar yanında kırmızı/yeşil yanıp sönen nokta) */
.profil-avatar-wrap { position: relative; }
.profil-online-dot,
.profil-offline-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  box-sizing: border-box;
  animation: profil-dot-blink 1.5s ease-in-out infinite;
}
.profil-online-dot {
  background: #22c55e;
  box-shadow: 0 0 0 2px #22c55e40;
}
.profil-offline-dot {
  background: #ef4444;
  box-shadow: 0 0 0 2px #ef444440;
}
@keyframes profil-dot-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

.profil-gizlilik-note {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.profil-gizlilik-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  text-decoration: underline;
}
.profil-gizlilik-link:hover { color: var(--accent-hover); }

/* Mobil: taşma ve kaydırma düzeltmeleri */
@media (max-width: 768px) {
  .profil-page {
    padding: 0 0.75rem 1.5rem;
  }
  .profil-cover {
    height: 140px;
    margin-bottom: -40px;
    border-radius: 0;
  }
  .profil-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
    gap: 1rem;
  }
  .profil-avatar-wrap {
    margin-top: 0.5rem;
  }
  .profil-avatar,
  .profil-avatar-placeholder {
    width: 96px;
    height: 96px;
    font-size: 2rem;
  }
  .profil-info {
    width: 100%;
    text-align: center;
  }
  .profil-header-actions {
    justify-content: center;
  }
  .profil-bio-display {
    justify-content: center;
  }
  .profil-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .profil-tabs {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
    padding-left: 0.75rem;
  }
  .profil-arkadas-list-item {
    flex-wrap: wrap;
  }
  .profil-arkadas-list a {
    min-width: 0;
  }
  .profil-arkadas-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 0.25rem;
  }
  .profil-pane {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .profil-eser-list {
    padding: 0;
    margin: 0;
    min-width: 0;
  }
  .profil-eser-list-item {
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
  }
  .profil-eser-list-link {
    flex: 1 1 100%;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    box-sizing: border-box;
  }
  .profil-eser-list-meta {
    flex: 0 0 auto;
    font-size: 0.75rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
