@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

/* ============================================
   KURUMSAL YEŞİL/BEYAZ TEMA SİSTEMİ
   ============================================ */

:root {
  /* Renk Paleti - Kurumsal Zümrüt */
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-300: #6ee7b7;
  --primary-400: #34d399;
  --primary-500: #10b981; /* Ana Renk */
  --primary-600: #059669; /* Hover ve Vurgu */
  --primary-700: #047857; /* Koyu Kurumsal */
  --primary-800: #065f46;
  --primary-900: #064e3b;

  --neutral-white: #ffffff;
  --neutral-50: #f9fafb;
  --neutral-100: #f3f4f6;
  --neutral-200: #e5e7eb;
  --neutral-300: #d1d5db;
  --neutral-400: #9ca3af;
  --neutral-500: #6b7280;
  --neutral-600: #4b5563;
  --neutral-800: #1f2937; /* Ana Metin */

  /* Anlamsal Renk Atamaları */
  --color-primary: var(--primary-600);
  --color-primary-light: var(--primary-50);
  --color-primary-hover: var(--primary-700);
  --color-bg-body: #f0f2f5; /* Göz yormayan gri-beyaz arka plan */
  --color-bg-card: var(--neutral-white);
  --color-text-main: var(--neutral-800);
  --color-text-sub: var(--neutral-500);
  --border-color: var(--neutral-200);

  /* Gölgeler & Radius */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-bg-body);
  padding: 20px;
  color: var(--color-text-main);
  /* Arka plana şık bir kurumsal desen/gradient ekleyelim */
  background-image: radial-gradient(circle at top left, var(--primary-100) 0%, transparent 40%),
                    radial-gradient(circle at bottom right, var(--primary-50) 0%, transparent 40%);
}

/* Form sayfaları için özel arka plan */
body:has(.form) {
  background: var(--color-bg-body);
}

.wrapper {
  background: var(--color-bg-card);
  max-width: 450px;
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
}

/* Form sayfaları için tam uzunluk */
body:has(.form) .wrapper {
  max-width: 100%;
  width: 100%;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  box-shadow: none;
  border: none;
}

/* Users sayfası için tam yükseklik */
body:has(.users),
body:has(.chat-area),
body:has(.form) {
  padding: 0;
  align-items: stretch;
}

body:has(.users) .wrapper,
body:has(.chat-area) .wrapper {
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  box-shadow: none;
}

/* ============================================
   FORMLAR (Giriş & Kayıt)
   ============================================ */
.form {
  padding: 40px 30px;
  max-width: 100%;
  box-sizing: border-box;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.users .form {
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.users .form form {
  width: 100%;
}

.users .form header {
  display: none;
}

.form header .app-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(16, 185, 129, 0.2));
}

.form form .field {
  display: flex;
  margin-bottom: 20px;
  flex-direction: column;
  position: relative;
}

.form form .field label {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-600);
}

.form form .input input {
  height: 50px;
  width: 100%;
  font-size: 15px;
  padding: 0 45px 0 15px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  background: var(--neutral-50);
  color: var(--neutral-800);
}

.form form .field.input {
  position: relative;
}

.form form .field.input i {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  margin-top: 12px;
  color: var(--neutral-500);
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
  z-index: 10;
}

.form form .field.input i:hover {
  color: var(--primary-600);
  transform: translateY(-50%) scale(1.1);
}

.form form .field.input i:active {
  color: var(--primary-700);
  transform: translateY(-50%) scale(0.95);
}

.form form .field.input i.active {
  color: var(--primary-600);
}

.form form .input input:focus {
  border-color: var(--primary-500);
  background: var(--neutral-white);
  box-shadow: 0 0 0 4px var(--primary-100);
  outline: none;
}

.form form .button input {
  height: 50px;
  border: none;
  color: #fff;
  font-size: 16px;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  border-radius: var(--radius-md);
  cursor: pointer;
  margin-top: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  letter-spacing: 0.5px;
}

.form form .button input:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(5, 150, 105, 0.4);
}

.form .link {
  text-align: center;
  margin: 15px 0;
  font-size: 15px;
  color: var(--neutral-500);
}

.form .link a {
  color: var(--primary-600);
  font-weight: 500;
}

.form .link a:hover {
  text-decoration: underline;
  color: var(--primary-700);
}

/* Profil Resmi Yükleme Alanı */
.form form .field.image {
  margin-bottom: 16px;
}

.form form .field.image .file-input-wrapper {
  position: relative;
  width: 100%;
}

.form form .field.image input[type="file"] {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.form form .field.image .file-input-label {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background: var(--neutral-white);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.form form .field.image .file-input-label:hover {
  border-color: var(--primary-500);
  background: var(--neutral-50);
}

.form form .field.image .file-input-label:active {
  transform: scale(0.98);
}

.form form .field.image .file-input-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.form form .field.image .file-input-content i {
  font-size: 18px;
  color: var(--primary-500);
  transition: all 0.2s ease;
}

.form form .field.image .file-input-label:hover .file-input-content i {
  color: var(--primary-600);
}

.form form .field.image .file-input-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-700);
  display: block;
  line-height: 1.2;
}

.form form .field.image .file-input-hint {
  font-size: 11px;
  color: var(--neutral-400);
  display: block;
  margin-top: 0;
  line-height: 1.2;
}

.form form .field.image .file-preview {
  display: none;
  margin-top: 15px;
  text-align: center;
}

.form form .field.image .file-preview.active {
  display: block;
}

.form form .field.image .file-preview img {
  max-width: 150px;
  max-height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-500);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
  animation: fadeIn 0.3s ease;
}

.form form .field.image .file-preview .file-name {
  margin-top: 10px;
  font-size: 14px;
  color: var(--neutral-600);
  font-weight: 500;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Hata Mesajları */
.form form .error-text {
  display: none;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-md);
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  animation: slideDown 0.3s ease;
}

.form form .error-text::before {
  content: '\f06a';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 8px;
  color: #ef4444;
}

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

/* Başarı Mesajları */
.form form .success-text {
  display: none;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid #10b981;
  border-radius: var(--radius-md);
  color: #059669;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  animation: slideDown 0.3s ease;
}

.form form .success-text::before {
  content: '\f00c';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-right: 8px;
  color: #10b981;
}

/* Ad Soyad Yan Yana (Signup) */
.form form .name-details {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.form form .name-details .field {
  flex: 1;
  margin-bottom: 0;
}

/* ============================================
   KULLANICI LİSTESİ (Sidebar Görünümü)
   ============================================ */
.users {
  padding: 0;
  background: var(--neutral-white);
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
}

.users header {
  /* Kurumsal Yeşil Gradyan Header */
  background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
  padding: 42px 25px 20px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  box-shadow: 0 4px 12px rgba(6, 78, 59, 0.15);
  flex-shrink: 0;
  gap: 15px;
}

.users header .content {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.users header .app-logo {
  height: 50px;
  width: 50px;
  object-fit: contain;
  border-radius: 0;
  border: none;
  margin-right: 15px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.users header img {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.users header img.profile-img-clickable:hover {
  transform: scale(1.05);
}

.users header .details {
  margin-left: 15px;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.users header .details span {
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  display: block;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.users header .details p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 300;
  margin-top: 2px;
  display: block;
  line-height: 1.3;
}

.users header .logout {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 40px;
  height: 40px;
}

.users header .header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.users header .settings-btn {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 40px;
  height: 40px;
}

.users header .settings-btn:hover {
  background: #fff;
  color: var(--primary-800);
}

.users header .logout:hover {
  background: #fff;
  color: var(--primary-800);
}

.users .search {
  padding: 15px 20px;
  display: flex;
  position: relative;
  align-items: center;
  background: var(--neutral-white);
  border-bottom: 1px solid var(--neutral-100);
}

.users .search .search-input-wrapper {
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.users .search input {
  width: 100%;
  height: 45px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg); /* Daha yuvarlak */
  padding: 0 15px 0 50px; /* İkon için soldan boşluk artırıldı */
  font-size: 15px;
  transition: all 0.2s ease;
  background: var(--neutral-50);
}

.users .search input:focus {
  background: #fff;
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px var(--primary-50);
  outline: none;
}

.users .search button {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--neutral-400);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.2s;
}

.users .search button.active {
  color: var(--primary-600);
}

.users-list {
  padding: 15px 20px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.users-list a {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding: 12px;
  page-break-inside: avoid;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  background: var(--neutral-white);
}

.users-list a:hover {
  background: var(--neutral-50);
  border-color: var(--neutral-200);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.users-list a .content {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.users-list a .content img {
  height: 45px;
  width: 45px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 12px;
}

.users-list a .content .details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.users-list a .details span {
  font-size: 15px;
  font-weight: 600;
  color: var(--neutral-800);
  display: block;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.users-list a .details p {
  color: var(--neutral-500);
  font-size: 13px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Durum Noktası */
.users-list a .status-dot {
  font-size: 12px;
  color: var(--primary-500); /* Online rengi */
  margin-left: auto;
  padding-left: 10px;
}

.users-list a .status-dot.offline {
  color: var(--neutral-400);
}

/* Empty State - Mesaj Yokken */
.users-list .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 60px 20px;
  text-align: center;
}

.users-list .empty-state-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 0.6s ease;
}

.users-list .empty-state-icon i {
  font-size: 36px;
  color: var(--primary-500);
  opacity: 0.7;
}

.users-list .empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--neutral-800);
  margin: 0 0 12px;
  letter-spacing: -0.3px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.users-list .empty-state p {
  font-size: 14px;
  color: var(--neutral-500);
  line-height: 1.6;
  margin: 0;
  animation: fadeInUp 0.6s ease 0.2s both;
}

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

/* ============================================
   SOHBET ALANI (Chat Area)
   ============================================ */
.chat-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  background: var(--neutral-white);
}

.chat-area header {
  /* Sohbet başlığı daha temiz/beyaz, minimal kurumsal stil */
  background: var(--neutral-white);
  padding: 37px 20px 15px 20px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--neutral-200);
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
  z-index: 10;
  position: relative;
  flex-shrink: 0;
}

.chat-area header .back-icon {
  color: var(--neutral-600);
  font-size: 20px;
  margin-right: 15px;
  margin-left: -8px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}

.chat-area header .back-icon:hover {
  background: var(--neutral-100);
  color: var(--neutral-800);
}

.chat-area header img {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  margin-right: 15px;
}

.chat-area header .details span {
  font-size: 16px;
  font-weight: 600;
  color: var(--neutral-800);
}

.chat-area header .details p {
  font-size: 13px;
  color: var(--primary-600); /* "Aktif" yazısı yeşil */
  font-weight: 500;
}

.chat-area header {
  position: relative;
}

.chat-area header .block-user-btn {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: var(--neutral-600);
  border: none;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.chat-area header .block-user-btn:hover {
  background: var(--neutral-100);
  color: #ef4444;
}

.chat-box {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  background: transparent;
  background-image: url('image.png');
  background-repeat: repeat;
  background-size: contain;
  background-position: 0 0;
  display: flex;
  flex-direction: column;
}

/* Chat Empty State */
.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 400px;
  text-align: center;
  padding: 60px 20px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
}

.chat-empty-state-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 30px;
  background: linear-gradient(135deg, var(--primary-100) 0%, var(--primary-50) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 0.6s ease;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
}

.chat-empty-state-icon i {
  font-size: 42px;
  color: var(--primary-500);
  opacity: 0.8;
}

.chat-empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--neutral-800);
  margin: 0 0 12px;
  letter-spacing: -0.3px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.chat-empty-state p {
  font-size: 15px;
  color: var(--neutral-500);
  line-height: 1.6;
  margin: 0;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.chat-box .chat {
  margin: 15px 0;
  position: relative;
  z-index: 1;
}

.chat-box .chat p {
  padding: 10px 16px;
  border-radius: 12px;
  max-width: 100%;
  min-width: 220px;
  word-wrap: break-word;
  word-break: normal;
  white-space: normal;
  font-size: 15px;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  display: inline-block;
}

/* GİDEN MESAJ (Outgoing) - Kurumsal Yeşil */
.chat-box .outgoing {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.chat-box .outgoing .details {
  display: flex;
  justify-content: flex-end;
  max-width: 80%;
  width: fit-content;
  margin-left: auto;
}

.chat-box .outgoing .details {
  position: relative;
}

.chat-box .outgoing .details p {
  background: var(--primary-600); /* Koyu yeşil arka plan */
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  color: #fff;
  border-bottom-right-radius: 2px;
  max-width: 100%;
  position: relative;
}

/* WhatsApp benzeri mesaj menü butonu (üçgen) - Masaüstü */
.message-menu-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  border: none;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
  padding: 0;
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.message-menu-btn i {
  font-size: 10px;
  color: #fff;
  pointer-events: none;
}

.chat-box .chat:hover .message-menu-btn {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.chat-box .chat .message-menu-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

.chat-box .chat .message-menu-btn:active {
  transform: scale(0.95);
}

/* Gelen mesajlar için menü butonu - Mesaj kutusunun içinde solda */
.chat-box .incoming .message-menu-btn {
  background: rgba(0, 0, 0, 0.1);
  right: auto;
  left: 12px; /* Mesaj kutusunun içinde, profil fotoğrafından sonra */
  top: 8px;
  transform: scale(0.8);
}

.chat-box .incoming .message-menu-btn i {
  color: var(--neutral-700);
}

.chat-box .incoming .message-menu-btn:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: scale(1);
}

.chat-box .chat:hover .incoming .message-menu-btn {
  transform: scale(1);
}

/* Giden mesajlar için menü butonu - Sağda */
.chat-box .outgoing .message-menu-btn {
  right: 8px;
  left: auto;
}

/* Silinen mesajlarda buton gösterilmesin */
.chat-box .chat.deleted .message-menu-btn {
  display: none !important;
}

/* Mobilde buton gösterilmesin */
@media screen and (max-width: 450px) {
  .message-menu-btn {
    display: none !important;
  }
}

.chat-box .chat {
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

.chat-box .chat.outgoing {
  cursor: pointer;
}

.chat-box .chat.incoming {
  cursor: pointer;
}

/* Long press sırasında text selection'ı engelle */
.chat-box .chat:active {
  user-select: none;
  -webkit-user-select: none;
}

/* Silinen mesajlar için stil */
.chat-box .chat.deleted .details p {
  font-style: italic;
  opacity: 0.6;
  color: var(--neutral-500);
}

.chat-box .chat.deleted.outgoing .details p {
  background: rgba(57, 166, 91, 0.3);
  color: rgba(255, 255, 255, 0.7);
}

.chat-box .chat.deleted.incoming .details p {
  background: rgba(255, 255, 255, 0.5);
  color: var(--neutral-500);
}

/* Silinen mesajlarda menü gösterilmesin */
.chat-box .chat.deleted {
  cursor: default;
}

/* WhatsApp benzeri mesaj menüsü */
.message-context-menu {
  position: fixed;
  background: var(--neutral-white);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  min-width: 180px;
  padding: 8px 0;
  display: none;
  animation: slideUp 0.2s ease;
}

.message-context-menu.active {
  display: block;
}

.message-context-menu-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 15px;
  color: var(--neutral-800);
  gap: 12px;
}

.message-context-menu-item:hover {
  background: var(--neutral-100);
}

.message-context-menu-item.delete {
  color: #ef4444;
}

.message-context-menu-item.delete:hover {
  background: #fee2e2;
}

.message-context-menu-item.delete-for-me {
  color: #ef4444;
}

.message-context-menu-item.delete-for-me:hover {
  background: #fee2e2;
}

.message-context-menu-item i {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

/* Okundu/Okunmadı durumu stilleri */
.chat-box .chat.outgoing {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  flex-direction: column;
}

.chat-box .chat.outgoing .details {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.message-status {
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 2px 6px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.2s ease;
}

.message-status i {
  font-size: 12px;
}

.message-status.unread {
  color: var(--neutral-500);
  background: rgba(255, 255, 255, 0.7);
}

.message-status.read {
  color: var(--primary-600);
  background: rgba(16, 185, 129, 0.15);
}

/* Resim mesajlarında durumu resmin sağ alt köşesine yerleştir */
.chat-box .chat.image-message.outgoing .message-image {
  position: relative;
}

.chat-box .chat.image-message.outgoing .message-image .message-status {
  position: absolute;
  bottom: 8px;
  right: 8px;
  margin: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 10;
  pointer-events: none;
}

/* Normal mesajlarda durumu mesajın altında göster */
.chat-box .chat:not(.image-message).outgoing .message-status {
  margin-top: 4px;
  align-self: flex-end;
}

/* Resim mesajları için stiller */
.message-image {
  margin-bottom: 8px;
  border-radius: 12px;
  overflow: hidden;
  width: 250px;
  height: 250px;
  max-width: 80%;
  cursor: pointer;
  transition: transform 0.2s ease;
  position: relative;
  flex-shrink: 0;
}

.message-image:hover {
  transform: scale(1.02);
}

.message-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: var(--neutral-100);
}

.chat-box .chat.image-message .details {
  position: relative;
}

.chat-box .chat.image-message .details p {
  margin-top: 8px;
}

/* Outgoing image message için details container */
.chat-box .chat.image-message.outgoing .details {
  position: relative;
}

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

/* GELEN MESAJ (Incoming) - Beyaz */
.chat-box .incoming {
  display: flex;
  align-items: flex-end;
}

.chat-box .incoming img {
  height: 30px;
  width: 30px;
  margin-right: 10px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

/* Gelen mesajlardaki profil resimlerini hedefle, message-image içindeki resimleri değil */
.chat-box .incoming > img {
  height: 30px;
  width: 30px;
  margin-right: 10px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.chat-box .incoming .details {
  display: flex;
  flex-direction: column;
  max-width: 80%;
  min-width: 0;
  width: fit-content;
}

/* Gelen mesajlardaki resimlerin de gönderilen resimlerle aynı boyutta görünmesi */
.chat-box .incoming.image-message .details {
  width: fit-content;
}

/* Gelen mesajlardaki message-image için özel stil - 250x250 kare */
.chat-box .incoming .message-image {
  width: 250px;
  height: 250px;
  min-width: 200px;
  max-width: 80%;
}

.chat-box .incoming .message-image img {
  width: 100% !important;
  height: 100% !important;
  border-radius: 12px !important;
  object-fit: cover !important;
  background: var(--neutral-100);
  display: block;
}

.chat-box .incoming .details p {
  background: var(--neutral-white);
  color: var(--neutral-800);
  border-bottom-left-radius: 2px;
  border: 1px solid var(--neutral-100);
  max-width: 100%;
}

/* Yazma Alanı (Typing Area) */
.typing-area {
  padding: 12px 16px;
  background: var(--neutral-white);
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--neutral-200);
  position: relative;
  z-index: 10;
  flex-shrink: 0;
  box-sizing: border-box;
}

.typing-area input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 20px;
  font-size: 15px;
  border: 1px solid var(--neutral-300);
  border-radius: 24px;
  outline: none;
  background: var(--neutral-50);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.typing-area input:focus {
  background: #fff;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.typing-area .image-btn {
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  min-height: 48px;
  border: none;
  outline: none;
  background: var(--neutral-100);
  color: var(--neutral-600);
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  flex-grow: 0;
  position: relative;
  z-index: 100;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.typing-area .image-btn:hover {
  background: var(--neutral-200);
  color: var(--primary-600);
}

.typing-area button[type='submit'] {
  width: 48px;
  height: 48px;
  min-width: 48px;
  max-width: 48px;
  min-height: 48px;
  border: none;
  outline: none;
  background: #39a65b;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(57, 166, 91, 0.3);
  flex-shrink: 0;
  flex-grow: 0;
  position: relative;
  z-index: 100;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  /* Minimum touch target size for mobile (44x44px recommended, but we use 48px) */
  padding: 0;
  box-sizing: border-box;
  /* Ensure button is always clickable */
  pointer-events: auto !important;
}

.typing-area button.active {
  opacity: 1;
  pointer-events: auto !important;
  background: #39a65b;
  cursor: pointer;
}

.typing-area button:not(.active) {
  opacity: 0.5;
  background: #9ca3af;
  cursor: not-allowed;
  pointer-events: auto !important;
  /* Still allow clicks even when inactive to show feedback */
}

.typing-area button.active:hover {
  background: #2d7a47;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(57, 166, 91, 0.4);
}

.typing-area button.active:active,
.typing-area button.active:focus {
  transform: scale(0.95);
  background: #1f5a33;
  outline: none;
}

/* Touch feedback for mobile */
.typing-area button:active {
  transform: scale(0.95);
  background: #1f5a33;
}

/* Loading state */
.typing-area button.loading {
  pointer-events: none;
  opacity: 0.7;
  cursor: wait;
}

.typing-area button.loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE DÜZENLEMELER
   ============================================ */
@media screen and (max-width: 450px) {
  body {
    padding: 0 !important;
    margin: 0;
    background: var(--neutral-white);
    width: 100%;
    overflow-x: hidden;
  }
  
  body:has(.form) {
    background: var(--color-bg-body);
    align-items: stretch;
  }
  
  /* Users ve chat sayfaları için stretch */
  body:has(.users),
  body:has(.chat-area) {
    align-items: stretch;
  }
  
  .wrapper {
    border-radius: 0;
    max-width: 100% !important;
    width: 100% !important;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Form sayfaları için wrapper */
  body:has(.form) .wrapper {
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Users ve chat sayfaları için wrapper */
  body:has(.users) .wrapper,
  body:has(.chat-area) .wrapper {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
  }
  
  body:has(.users) .wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .form, .users {
    padding: 0;
    margin: 0;
  }
  
  .form {
    padding: 20px 15px !important;
    max-height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }
  
  .users .form {
    max-width: 100%;
    width: 100%;
    padding: 20px 15px;
  }
  
  .form header {
    font-size: 20px;
    padding-bottom: 12px;
    margin-bottom: 15px;
    gap: 8px;
  }
  
  .form header .app-logo {
    width: 32px;
    height: 32px;
  }
  
  .form form {
    width: 100%;
    box-sizing: border-box;
  }
  
  .form form .field {
    margin-bottom: 14px;
  }
  
  .form form .field label {
    font-size: 13px;
    margin-bottom: 6px;
  }
  
  .form form .input input {
    height: 44px;
    font-size: 15px;
    padding: 0 40px 0 12px;
  }
  
  .form form .button input {
    height: 44px;
    font-size: 14px;
    margin-top: 8px;
  }
  
  .form form .name-details {
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
  }
  
  .form form .name-details .field {
    margin-bottom: 0;
  }
  
  .form form .error-text,
  .form form .success-text {
    padding: 10px 12px;
    font-size: 12px;
    margin-bottom: 14px;
  }
  
  .form form .field.image .file-input-label {
    min-height: 56px;
    padding: 10px 14px;
  }
  
  .form form .field.image .file-input-content i {
    font-size: 16px;
  }
  
  .form form .field.image .file-input-text {
    font-size: 13px;
  }
  
  .form form .field.image .file-input-hint {
    font-size: 11px;
  }
  
  .form form .field.image .file-preview img {
    max-width: 120px;
    max-height: 120px;
  }
  
  .form .link {
    margin: 10px 0;
    font-size: 13px;
  }
  
  .users {
    height: 100vh;
    max-height: 100vh;
    padding: 0;
    margin: 0;
    width: 100%;
  }
  
  .users header {
    padding: 37px 20px 15px 20px;
    flex-wrap: nowrap;
    margin: 0;
  }
  
  .users header .content {
    min-width: 0;
    flex: 1;
  }
  
  .users header .details {
    min-width: 0;
  }
  
  .users header .details span {
    font-size: 15px;
  }
  
  .users .search {
    padding: 15px 20px;
    margin: 0;
  }
  
  .users-list {
    flex: 1;
    min-height: 0;
    padding: 8px 0;
    margin: 0;
    width: 100%;
  }
  
  .users-list a {
    margin-left: 12px;
    margin-right: 12px;
    margin-bottom: 12px;
  }
  
  .chat-area {
    height: 100vh;
    max-height: 100vh;
  }
  
  .chat-box {
    flex: 1;
    min-height: 0;
    padding: 20px 20px 80px 20px;
  }
  
  .chat-box .chat p {
    max-width: 85%;
    min-width: 150px;
  }
  
  /* Mobilde resimleri daha küçük yap */
  .message-image {
    width: 200px !important;
    height: 200px !important;
    max-width: 75% !important;
  }
  
  .chat-box .incoming .message-image {
    width: 200px !important;
    height: 200px !important;
    min-width: 180px !important;
    max-width: 75% !important;
  }
  
  .chat-box .chat.image-message.outgoing .message-image .message-status {
    bottom: 6px;
    right: 6px;
    font-size: 11px;
    min-width: 16px;
    height: 16px;
    padding: 2px 5px;
    z-index: 10;
  }
  
  .chat-box .chat.image-message.outgoing .message-image .message-status i {
    font-size: 10px;
  }
  
  .chat-empty-state {
    min-height: 300px;
    padding: 40px 15px;
  }
  
  .chat-empty-state-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
  }
  
  .chat-empty-state-icon i {
    font-size: 36px;
  }
  
  .chat-empty-state h3 {
    font-size: 18px;
  }
  
  .chat-empty-state p {
    font-size: 14px;
  }
  
  
  .typing-area {
    position: fixed;
    bottom: 0;
    width: 100%;
    padding: 12px 12px max(15px, env(safe-area-inset-bottom)) 12px;
    z-index: 1000;
    box-sizing: border-box;
    gap: 8px;
  }
  
  .typing-area input {
    min-width: 0;
    padding: 0 16px;
    font-size: 14px;
  }
  
  /* Samsung S22 Ultra and large mobile devices optimization */
  .typing-area button {
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    min-height: 48px;
    font-size: 20px;
    z-index: 1001;
    /* Ensure button is above all other elements */
    position: relative;
    flex-shrink: 0;
    flex-grow: 0;
    margin-left: 0;
  }
  
  .typing-area button:active {
    transform: scale(0.92);
    background: #1f5a33;
  }
  
  /* Prevent accidental double-taps */
  .typing-area button {
    -webkit-tap-highlight-color: rgba(57, 166, 91, 0.3);
  }
  
  .message-context-menu {
    min-width: 160px;
    padding: 6px 0;
  }
  
  .message-context-menu-item {
    padding: 14px 18px;
    font-size: 16px;
  }
}

/* Scrollbar Özelleştirme - İnce ve Yeşil */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--neutral-300);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-400);
}

/* ============================================
   PROFİL AYARLARI SAYFASI
   ============================================ */
.settings-page {
  padding: 0;
  background: var(--neutral-white);
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
}

.settings-page header .back-icon-header {
  color: #fff;
  font-size: 18px;
  margin-right: 15px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  text-decoration: none;
}

.settings-page header .back-icon-header:hover {
  background: rgba(255, 255, 255, 0.2);
}

.settings-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  background: var(--color-bg-body);
}

.settings-section {
  margin-bottom: 20px;
  padding: 20px;
  background: var(--neutral-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
}

.settings-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--neutral-200);
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-section h3 i {
  color: var(--primary-600);
  font-size: 20px;
}

.settings-section.danger-zone {
  border: 2px solid #ef4444;
  background: #fef2f2;
}

.settings-section.danger-zone h3 {
  color: #ef4444;
  border-bottom-color: #fecaca;
}

.danger-zone-content {
  text-align: center;
}

.danger-zone-content p {
  color: var(--neutral-600);
  margin-bottom: 20px;
  font-size: 14px;
}

.btn-danger {
  background: #ef4444;
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.profile-image-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.profile-image-preview {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-500);
  box-shadow: var(--shadow-md);
}

.profile-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.profile-image-preview img.profile-img-clickable:hover {
  transform: scale(1.05);
}

/* Engellenen Kullanıcılar */
.blocked-users-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blocked-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: var(--neutral-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-200);
  transition: all 0.2s ease;
}

.blocked-user-item:hover {
  background: var(--neutral-100);
  box-shadow: var(--shadow-sm);
}

.blocked-user-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.blocked-user-content img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.blocked-user-details span {
  font-size: 15px;
  font-weight: 500;
  color: var(--neutral-800);
}

.btn-unblock {
  background: var(--primary-600);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-unblock:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.empty-blocked-users {
  text-align: center;
  padding: 40px 20px;
  color: var(--neutral-500);
}

.empty-blocked-users p {
  font-size: 14px;
}

/* Settings sayfası form stilleri */
.settings-content .field {
  margin-bottom: 20px;
}

.settings-content .field:last-child {
  margin-bottom: 0;
}

.settings-content .field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-700);
}

.settings-content .field.input {
  position: relative;
}

.settings-content .field.input input {
  width: 100%;
  height: 50px;
  padding: 0 45px 0 15px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  font-size: 15px;
  background: var(--neutral-50);
  color: var(--neutral-800);
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.settings-content .field.input input:focus {
  border-color: var(--primary-500);
  background: var(--neutral-white);
  box-shadow: 0 0 0 4px var(--primary-100);
  outline: none;
}

.settings-content .field.input i {
  position: absolute;
  right: 15px;
  top: calc(8px + 1.2em + 25px);
  transform: translateY(-50%);
  color: var(--neutral-500);
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s ease;
  z-index: 10;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.settings-content .field.input i:hover {
  color: var(--primary-600);
  transform: translateY(-50%) scale(1.1);
}

.settings-content .field.input i:active {
  color: var(--primary-700);
  transform: translateY(-50%) scale(0.95);
}

.settings-content .field.input i:active {
  color: var(--primary-700);
  transform: translateY(-50%) scale(0.95);
}

.settings-content .field.input i.active {
  color: var(--primary-600);
}

.settings-content .field.button {
  margin-top: 10px;
}

.settings-content .field.button input {
  width: 100%;
  height: 50px;
  border: none;
  color: #fff;
  font-size: 16px;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
  letter-spacing: 0.5px;
}

.settings-content .field.button input:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(5, 150, 105, 0.4);
}

.settings-content .field.button input:active {
  transform: translateY(0);
}

.settings-content .field.image {
  margin-bottom: 20px;
}

.settings-content .file-input-wrapper {
  position: relative;
  width: 100%;
}

.settings-content .file-input-wrapper input[type="file"] {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.settings-content .file-input-wrapper input[type="file"]::-webkit-file-upload-button {
  display: none;
}

.settings-content .file-input-label {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-md);
  background: var(--neutral-white);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.settings-content .file-input-label:hover {
  border-color: var(--primary-500);
  background: var(--neutral-50);
}

.settings-content .file-input-label:active {
  transform: scale(0.98);
}

.settings-content .file-input-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.settings-content .file-input-content i {
  font-size: 20px;
  color: var(--primary-500);
  transition: all 0.2s ease;
}

.settings-content .file-input-label:hover .file-input-content i {
  color: var(--primary-600);
}

.settings-content .file-input-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--neutral-700);
  display: block;
  line-height: 1.2;
}

.settings-content .file-input-hint {
  font-size: 12px;
  color: var(--neutral-500);
  display: block;
  margin-top: 0;
  line-height: 1.2;
}

.settings-content .error-text {
  display: none;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-left: 4px solid #ef4444;
  border-radius: var(--radius-md);
  color: #dc2626;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  animation: slideDown 0.3s ease;
}

.settings-content .success-text {
  display: none;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid #10b981;
  border-radius: var(--radius-md);
  color: #059669;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  animation: slideDown 0.3s ease;
}

/* Settings sayfası için responsive */
@media screen and (max-width: 450px) {
  .settings-content {
    padding: 15px;
  }
  
  .settings-section {
    padding: 15px;
    margin-bottom: 15px;
  }
  
  .settings-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
  }
  
  .profile-image-preview {
    width: 120px;
    height: 120px;
  }
  
  .settings-page header .back-icon-header {
    margin-right: 10px;
  }
  
  .settings-content .field.input input {
    height: 48px;
    font-size: 15px;
    padding: 0 40px 0 12px;
  }
  
  .settings-content .field.button input {
    height: 48px;
    font-size: 15px;
  }
  
  .settings-content .file-input-label {
    min-height: 48px;
    padding: 10px 14px;
  }
}

/* ============================================
   SAMSUNG S22 ULTRA & LARGE MOBILE OPTIMIZATION
   ============================================ */
/* Extra optimizations for large screen mobile devices */
@media screen and (max-width: 450px) and (min-height: 800px) {
  .typing-area {
    padding: 16px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  
  .typing-area button {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    font-size: 24px;
    /* Extra padding for better touch target */
    box-shadow: 0 4px 12px rgba(57, 166, 91, 0.4);
  }
  
  .typing-area input {
    height: 52px;
    font-size: 16px;
    padding: 0 24px;
  }
}

/* Samsung-specific optimizations */
@supports (-webkit-touch-callout: none) {
  .typing-area button {
    /* Better touch handling on WebKit browsers (Samsung Internet) */
    -webkit-tap-highlight-color: rgba(57, 166, 91, 0.4);
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
}

/* Ensure button is always accessible and clickable */
.typing-area button,
.typing-area button.active,
.typing-area button:not(.active) {
  /* Force pointer events on all states */
  pointer-events: auto !important;
  /* Ensure button is above other elements */
  position: relative;
  z-index: 1001;
}

/* Prevent any overlay from blocking the button */
.typing-area::before,
.typing-area::after {
  pointer-events: none;
  z-index: -1;
}

/* ============================================
   KULLANICI DETAY SAYFASI
   ============================================ */
.user-detail-page {
  padding: 0;
  background: var(--neutral-white);
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
}

.user-detail-page header .back-icon-header {
  color: #fff;
  font-size: 18px;
  margin-right: 15px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  text-decoration: none;
  flex-shrink: 0;
}

.user-detail-page header .back-icon-header:hover {
  background: rgba(255, 255, 255, 0.2);
}

.user-detail-page header .content {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 15px;
}

.user-detail-page header .content img {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
  flex-shrink: 0;
  margin-right: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.user-detail-page header .content img.profile-img-clickable:hover {
  transform: scale(1.05);
}

.user-detail-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 30px 20px;
  background: var(--color-bg-body);
}

.user-detail-card {
  background: var(--neutral-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: 30px;
  text-align: center;
  border: 1px solid var(--neutral-200);
}

.user-avatar-large {
  width: 150px;
  height: 150px;
  margin: 0 auto 25px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--primary-500);
  box-shadow: var(--shadow-lg);
}

.user-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  margin-bottom: 30px;
}

.user-info h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--neutral-800);
  margin-bottom: 8px;
}

.user-info .username {
  font-size: 16px;
  color: var(--neutral-500);
  margin-bottom: 15px;
}

.status-info {
  display: flex;
  justify-content: center;
  align-items: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
}

.status-badge.online {
  background: var(--primary-50);
  color: var(--primary-700);
}

.status-badge.online i {
  color: var(--primary-500);
  font-size: 10px;
}

.status-badge.offline {
  background: var(--neutral-100);
  color: var(--neutral-600);
}

.status-badge.offline i {
  color: var(--neutral-400);
  font-size: 10px;
}

.user-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
}

.user-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(5, 150, 105, 0.4);
}

.btn-primary i {
  font-size: 18px;
}

.btn-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  background: var(--neutral-100);
  color: var(--neutral-700);
  border: 2px solid var(--neutral-300);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-block:hover {
  background: var(--neutral-200);
  border-color: var(--neutral-400);
  transform: translateY(-1px);
}

.btn-block.blocked {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-block.blocked:hover {
  background: #fecaca;
  border-color: #fca5a5;
}

.btn-block i {
  font-size: 18px;
}

.btn-delete-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  background: #fee2e2;
  color: #dc2626;
  border: 2px solid #fecaca;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-delete-all:hover {
  background: #fecaca;
  border-color: #fca5a5;
  transform: translateY(-1px);
}

.btn-delete-all i {
  font-size: 18px;
}

/* Chat header link */
.user-header-link {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.user-header-link:hover {
  opacity: 0.8;
}

.user-header-link img {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  margin-right: 15px;
}

.user-header-link .details {
  flex: 1;
  min-width: 0;
  text-align: left;
}

/* Responsive */
@media screen and (max-width: 450px) {
  .user-detail-content {
    padding: 20px 15px;
  }
  
  .user-detail-card {
    padding: 20px;
  }
  
  .user-avatar-large {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
  }
  
  .user-info h2 {
    font-size: 20px;
  }
  
  .user-info .username {
    font-size: 14px;
  }
  
  .btn-primary,
  .btn-block {
    height: 48px;
    font-size: 15px;
  }
  
  .user-detail-page header .back-icon-header {
    margin-right: 10px;
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .user-detail-page header .content {
    gap: 10px;
  }
  
  .user-detail-page header .content img {
    height: 42px;
    width: 42px;
  }
}

/* ============================================
   PROFİL FOTOĞRAFI MODAL (WhatsApp Benzeri)
   ============================================ */
.profile-image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.profile-image-modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.modal-content {
  position: relative;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  max-width: 500px;
  animation: scaleIn 0.3s ease;
}

/* Mesaj fotoğrafları için modal content genişlet */
#imageModal .modal-content {
  width: 100%;
  max-width: 100%;
  height: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content img {
  width: 80vw;
  height: 80vw;
  max-width: 500px;
  max-height: 500px;
  min-width: 250px;
  min-height: 250px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  border: 5px solid rgba(255, 255, 255, 0.1);
  display: block;
  aspect-ratio: 1 / 1;
}

/* Mesaj fotoğrafları için modal - orijinal oranları koru */
#modalImage {
  width: auto !important;
  height: auto !important;
  max-width: 95vw !important;
  max-height: 95vh !important;
  min-width: auto !important;
  min-height: auto !important;
  border-radius: 12px !important;
  object-fit: contain !important;
  object-position: center !important;
  aspect-ratio: auto !important;
  border: none !important;
}

.modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s ease;
  z-index: 10002;
}

/* Mesaj fotoğrafları için kapatma butonu - üst sağda */
#imageModal .modal-close {
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  width: 44px;
  height: 44px;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes scaleIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* User item wrapper - Yeni yapı */
.user-item-wrapper,
.users-list a {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  padding: 12px;
  page-break-inside: avoid;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  background: var(--neutral-white);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.user-item-wrapper:hover,
.users-list a:hover {
  background: var(--neutral-50);
  border-color: var(--neutral-200);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.user-item-wrapper .content,
.users-list a .content {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.user-item-wrapper .content img,
.users-list a .content img {
  height: 45px;
  width: 45px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 12px;
  transition: transform 0.2s ease;
}

.user-item-wrapper .content img.profile-img-clickable {
  cursor: pointer;
}

.user-item-wrapper .content img.profile-img-clickable:hover {
  transform: scale(1.05);
}

.user-item-wrapper .content .details,
.users-list a .content .details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

.user-item-wrapper .details span,
.users-list a .details span {
  font-size: 15px;
  font-weight: 600;
  color: var(--neutral-800);
  display: block;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-item-wrapper .details p,
.users-list a .details p {
  color: var(--neutral-500);
  font-size: 13px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-item-wrapper .status-dot,
.users-list a .status-dot {
  font-size: 12px;
  color: var(--primary-500);
  margin-left: auto;
  padding-left: 10px;
}

.user-item-wrapper .status-dot.offline,
.users-list a .status-dot.offline {
  color: var(--neutral-400);
}

/* User detail sections */
.user-detail-sections {
  margin: 30px 0;
  border-top: 1px solid var(--neutral-200);
  border-bottom: 1px solid var(--neutral-200);
  padding: 20px 0;
}

.detail-section {
  padding: 15px 0;
  border-bottom: 1px solid var(--neutral-100);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-label {
  font-size: 13px;
  color: var(--neutral-500);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 16px;
  color: var(--neutral-800);
  font-weight: 400;
}

.detail-value.bio {
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.user-avatar-large {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.user-avatar-large:hover {
  transform: scale(1.05);
}

/* Responsive modal */
@media screen and (max-width: 450px) {
  .modal-content {
    width: 95%;
    max-width: 95%;
  }
  
  .modal-content img {
    width: 85vw;
    height: 85vw;
    max-width: 85vw;
    max-height: 85vw;
    min-width: 200px;
    min-height: 200px;
  }
  
  /* Mesaj fotoğrafları için mobil */
  #modalImage {
    max-width: 98vw !important;
    max-height: 98vh !important;
  }
  
  .modal-close {
    top: -40px;
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  /* Mesaj fotoğrafları için mobil kapatma butonu */
  #imageModal .modal-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .user-item-wrapper {
    margin-bottom: 12px;
    padding: 10px;
  }
}