@font-face {
  font-family: 'SeguiEmoji';
  src: url('/fonts/SEGUIEMJ.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  unicode-range: U+1F300-1F5FF, U+1F600-1F64F, U+1F680-1F6FF, U+1F700-1F77F, U+1F780-1F7FF, U+1F800-1F8FF, U+1F900-1F9FF, U+1FA00-1FA6F, U+1FA70-1FAFF;
}

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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', Arial, sans-serif;
}

.emoji, .fluent-emoji, .msg-avatar, .group-name-text, .role-badge {
  font-family: 'SeguiEmoji', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif !important;
}

body {
  background: #0f172a;
  color: white;
  height: 100vh;
}

body.theme-light {
  background: #f8fafc;
  color: #0f172a;
}

body.theme-light .topbar,
body.theme-light .chatHeader {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
}

body.theme-light .groupItem {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #0f172a;
}

body.theme-light .groupItem:hover {
  background: #e2e8f0;
}

body.theme-light .empty-state {
  color: #475569;
}

body.theme-dark .topbar,
body.theme-dark .chatHeader {
  background: #111827;
  border-color: #1f2937;
}

.app {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* ── Topbar ── */
.topbar {
  padding: 0 16px;
  min-height: 60px;
  font-size: 20px;
  font-weight: 700;
  background: #111827;
  border-bottom: 1px solid #1f2937;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.16);
  transform: translateY(-1px);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: 700;
  color: #111827;
  background: #facc15;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.hidden {
  display: none !important;
}

/* ── Group List ── */
.groupList {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.empty-state {
  text-align: center;
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
  margin-top: 60px;
  padding: 0 20px;
}

.groupItem {
  padding: 15px 16px;
  background: #1f2937;
  border-radius: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.groupItem:hover {
  background: #263244;
  border-color: #3b82f6;
  transform: translateX(2px);
}

.group-name-text {
  font-weight: 600;
  font-size: 15px;
}

.role-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}

.role-badge.role-admin {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.role-badge.role-normal {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.role-badge.small {
  font-size: 10px;
  padding: 2px 8px;
}

.floatingBtn {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  font-size: 28px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
  transition: transform 0.15s, box-shadow 0.15s;
  line-height: 1;
}

.floatingBtn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.7);
}

/* ── Chat Header ── */
.chatHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: #111827;
  border-bottom: 1px solid #1f2937;
  min-height: 60px;
}

.icon-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.icon-btn:hover {
  background: rgba(255,255,255,0.12);
}

/* ── Messages ── */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ── Mesaj satırı (avatar + balon) ── */
.message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 80%;
}
.message-row.me  { align-self: flex-end;   flex-direction: row-reverse; }
.message-row.other { align-self: flex-start; flex-direction: row; }

/* ── Küçük avatar ── */
.msg-avatar {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.1);
}
.msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bubble {
  padding: 10px 14px;
  border-radius: 16px;
  max-width: 100%;
  word-break: break-word;
}

.me .bubble {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-bottom-right-radius: 4px;
}

.other .bubble {
  background: #1e293b;
  border: 1px solid #334155;
  border-bottom-left-radius: 4px;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}

.sender-name {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.8;
}

.message-time {
  font-size: 10px;
  opacity: 0.55;
  white-space: nowrap;
}

.message-text {
  font-size: 14px;
  line-height: 1.5;
}

/* ── Fluent Emoji (Windows 11 stili) ── */
.message-text img.fluent-emoji {
  width: 22px;
  height: 22px;
  vertical-align: middle;
  display: inline-block;
  margin: 0 1px;
}

/* ── Message Box ── */
.messageBox {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #111827;
  border-top: 1px solid #1f2937;
}

.messageBox input {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #334155;
  border-radius: 22px;
  background: #1e293b;
  color: white;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.messageBox input:focus {
  border-color: #3b82f6;
}

.messageBox input::placeholder {
  color: #475569;
}

.messageBox button {
  padding: 10px 18px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.messageBox button:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* ── SETTINGS SCREEN ── */
.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 18px;
}

.settings-card-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 14px;
}

.danger-card {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
}

/* Members list */
.members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #0f172a;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid #1e293b;
}

.member-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.member-email {
  font-size: 13px;
  font-weight: 500;
  color: #e2e8f0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.you-label {
  font-size: 11px;
  color: #3b82f6;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 20px;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-toggle-role {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-toggle-role:hover {
  background: #334155;
  color: white;
}

.btn-remove-member {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-remove-member:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* Add member row */
.add-member-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rename-row {
  display: flex;
  gap: 8px;
}

.settings-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: white;
  font-size: 13px;
  outline: none;
  min-width: 0;
  transition: border-color 0.15s;
}

.settings-input:focus {
  border-color: #3b82f6;
}

.settings-input::placeholder {
  color: #475569;
}

.settings-select {
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: white;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.btn-primary {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.btn-primary.small {
  padding: 8px 14px;
  font-size: 13px;
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-danger {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1e293b;
  border: 1px solid #334155;
  color: white;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
}

.toast-error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.toast-info {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

/* Yeni mesaj bildirimi toast */
.toast-message {
  border-color: rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
}

/* ── DIALOG (confirm/input) ── */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  padding: 20px;
}

.dialog-box {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 20px;
  padding: 28px 28px 22px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}

.dialog-box h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.dialog-box p {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 18px;
}

.dialog-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: #0f172a;
  color: white;
  font-size: 14px;
  outline: none;
  margin-bottom: 16px;
  transition: border-color 0.15s;
}

.dialog-input:focus {
  border-color: #3b82f6;
}

.dialog-input::placeholder {
  color: #475569;
}

.dialog-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.dialog-cancel {
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid #334155;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.dialog-cancel:hover {
  background: #334155;
  color: white;
}

.dialog-ok {
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.dialog-ok:hover {
  opacity: 0.88;
}

.dialog-ok.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* ── Topbar arama butonu ── */

/* ── Profil popup ── */
.profile-box {
  text-align: center;
  padding: 28px 24px 20px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: white;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.profile-nickname {
  font-size: 18px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 4px;
}

.profile-id {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 20px;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.profile-actions .btn-primary,
.profile-actions .btn-danger {
  width: 100%;
  max-width: 220px;
}

/* ══════════════════════════════════════════════
   📱 TELEFON UYUMU (max-width: 767px)
   Tablet ve masaüstü hiç etkilenmez.
══════════════════════════════════════════════ */
@media (max-width: 767px) {

  /* ── Genel ── */
  body {
    font-size: 15px;
  }

  /* ── Topbar (Gruplar ekranı) ── */
  .topbar {
    padding: 0 12px;
    min-height: 56px;
    font-size: 17px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
    font-size: 17px;
    border-radius: 10px;
  }

  /* ── Grup listesi ── */
  .groupList {
    padding: 10px;
  }

  .groupItem {
    padding: 13px 14px;
    border-radius: 12px;
    margin-bottom: 8px;
  }

  .group-name-text {
    font-size: 14px;
  }

  /* ── Floating buton ── */
  .floatingBtn {
    right: 16px;
    bottom: 20px;
    width: 54px;
    height: 54px;
    font-size: 26px;
  }

  /* ── Chat Header ── */
  .chatHeader {
    padding: 10px 12px;
    min-height: 56px;
  }

  /* ── Mesajlar ── */
  .messages {
    padding: 10px;
    gap: 5px;
  }

  .message-row {
    max-width: 88%;
  }

  .bubble {
    padding: 9px 13px;
    font-size: 14px;
    border-radius: 14px;
  }

  .msg-avatar {
    width: 26px;
    height: 26px;
    min-width: 26px;
    font-size: 11px;
  }

  .message-text {
    font-size: 14px;
  }

  .sender-name {
    font-size: 10px;
  }

  .message-time {
    font-size: 10px;
  }

  /* ── Mesaj kutusu ── */
  .messageBox {
    padding: 8px 10px;
    gap: 7px;
  }

  .messageBox input {
    padding: 10px 14px;
    font-size: 15px;
    border-radius: 22px;
  }

  .messageBox button {
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 22px;
  }

  /* ── Ayarlar ekranı ── */
  .settings-body {
    padding: 12px;
    gap: 12px;
  }

  .settings-card {
    padding: 14px;
    border-radius: 14px;
  }

  .settings-card-title {
    font-size: 12px;
    margin-bottom: 12px;
  }

  .add-member-row {
    flex-direction: column;
  }

  .add-member-row .settings-select {
    width: 100%;
  }

  .rename-row {
    flex-direction: column;
  }

  .settings-input {
    font-size: 15px;
    padding: 11px 14px;
  }

  .btn-primary {
    font-size: 15px;
    padding: 11px 18px;
  }

  .btn-primary.small {
    font-size: 14px;
    padding: 10px 14px;
    width: 100%;
  }

  .btn-danger {
    font-size: 15px;
    padding: 13px;
  }

  /* ── Üye listesi ── */
  .member-item {
    padding: 10px 12px;
    flex-wrap: wrap;
  }

  .member-email {
    font-size: 13px;
  }

  .member-actions {
    gap: 5px;
  }

  .btn-toggle-role,
  .btn-remove-member {
    font-size: 11px;
    padding: 5px 10px;
  }

  /* ── Dialog ── */
  .dialog-box {
    padding: 22px 18px 18px;
    border-radius: 18px;
    max-width: 95vw;
  }

  .dialog-box h3 {
    font-size: 16px;
  }

  .dialog-box p {
    font-size: 13px;
  }

  .dialog-btns {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .dialog-cancel,
  .dialog-ok {
    width: 100%;
    padding: 12px;
    text-align: center;
  }

  /* ── Toast ── */
  .toast {
    font-size: 13px;
    padding: 11px 18px;
    bottom: 16px;
    max-width: 94vw;
  }
}

/* ── TYPING INDICATOR ── */
/* typing-indicator — see animation block below */

/* ── MESAJ AKSIYON BUTONLARI ── */
.msg-actions {
  display: none;
  gap: 4px;
  margin-top: 4px;
}
.bubble:hover .msg-actions { display: flex; }
.msg-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 5px;
  border-radius: 4px;
  opacity: 0.6;
  transition: opacity 0.15s;
}
.msg-action-btn:hover { opacity: 1; background: rgba(255,255,255,0.08); }

/* ── DÜZENLENDI BADGE ── */
.edited-badge {
  font-size: 10px;
  color: #64748b;
  margin-left: 4px;
}

/* ── DOSYA MESAJLARI ── */
.msg-file-wrap { max-width: 280px; }
.msg-image {
  max-width: 100%;
  max-height: 260px;
  border-radius: 10px;
  cursor: pointer;
  display: block;
  transition: opacity 0.15s;
}
.msg-image:hover { opacity: 0.85; }
.msg-video-thumb {
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  display: inline-block;
  max-width: 100%;
}
.msg-video {
  max-width: 100%;
  max-height: 260px;
  border-radius: 10px;
  display: block;
  pointer-events: none;
}
.msg-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #fff;
  background: rgba(0,0,0,0.35);
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ── MEDİA VİEWER (LİGHTBOX) ── */
.cc-viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  display: flex;
  flex-direction: column;
  animation: ccFadeIn 0.18s ease;
}
@keyframes ccFadeIn { from { opacity:0 } to { opacity:1 } }
.cc-viewer-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  flex-shrink: 0;
}
.cc-viewer-back {
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.cc-viewer-back:hover { background: rgba(255,255,255,0.2); }
.cc-viewer-title {
  flex: 1;
  color: #e2e8f0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-viewer-dl {
  background: rgba(99,102,241,0.35);
  border: none;
  color: #fff;
  font-size: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.cc-viewer-dl:hover { background: rgba(99,102,241,0.6); }
.cc-viewer-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.cc-viewer-media {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  padding: 12px;
  box-sizing: border-box;
}
.cc-viewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  user-select: none;
}
.cc-viewer-vid {
  max-width: 100%;
  max-height: 100%;
  border-radius: 6px;
  outline: none;
}
.cc-viewer-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  font-size: 36px;
  width: 48px;
  height: 64px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s;
  backdrop-filter: blur(4px);
}
.cc-viewer-arrow:hover { background: rgba(255,255,255,0.28); }
.cc-viewer-arrow.left  { left: 10px; }
.cc-viewer-arrow.right { right: 10px; }
.msg-file-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
  color: #93c5fd;
  font-size: 14px;
  word-break: break-all;
  width: 100%;
  box-sizing: border-box;
}
.msg-file-link:hover { background: rgba(255,255,255,0.12); }
.msg-file-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}
.msg-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99,102,241,0.25);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 13px;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.2s;
}
.msg-download-btn:hover { background: rgba(99,102,241,0.5); }

/* ── ATTACH BUTONU ── */
.attach-btn {
  font-size: 18px;
  padding: 0 8px;
  flex-shrink: 0;
}

/* ── DAVET LİNKİ INPUT ── */
#inviteLinkInput { font-size: 12px; }

/* ── SESLI ARAMA UI ── */
#callUI {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
}
.call-box {
  background: var(--bg-secondary, #1e293b);
  border-radius: 24px;
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.08);
}
.call-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  font-weight: bold;
  color: #fff;
  animation: callPulse 1.5s ease-in-out infinite;
}
@keyframes callPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59,130,246,0.4); }
  50%       { box-shadow: 0 0 0 16px rgba(59,130,246,0); }
}
.call-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #f1f5f9);
}
.call-status {
  font-size: 14px;
  color: #94a3b8;
}
.call-actions {
  display: flex;
  gap: 20px;
  margin-top: 8px;
}
.call-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, opacity 0.15s;
}
.call-btn:hover { transform: scale(1.1); }
.accept-btn { background: #22c55e; }
.reject-btn { background: #ef4444; }

/* ══════════════════════════════════════════
   WhatsApp Özellikleri - Ek CSS
   ══════════════════════════════════════════ */

/* ── TARIH AYRAÇ ── */
.date-separator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
}
.date-separator span {
  background: rgba(99,102,241,0.18);
  color: #94a3b8;
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}

/* ── REPLY BAR (mesaj kutusu üstü) ── */
.reply-bar {
  background: var(--bg-secondary, #1e293b);
  border-left: 3px solid #6366f1;
  padding: 6px 12px;
}
.reply-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}
.reply-bar-line {
  width: 3px;
  border-radius: 3px;
  background: #6366f1;
  align-self: stretch;
  flex-shrink: 0;
}
.reply-bar-content { flex: 1; min-width: 0; }
.reply-bar-name { font-size: 12px; color: #818cf8; font-weight: 600; display: block; }
.reply-bar-text { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.reply-bar-close {
  background: none; border: none; color: #94a3b8; cursor: pointer;
  font-size: 16px; padding: 4px; border-radius: 50%; line-height: 1;
  transition: color 0.15s;
}
.reply-bar-close:hover { color: #f87171; }

/* ── REPLY QUOTE (mesaj içinde) ── */
.msg-reply-quote {
  background: rgba(99,102,241,0.12);
  border-left: 3px solid #6366f1;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
}
.reply-quote-name { font-size: 11px; color: #818cf8; font-weight: 600; margin-bottom: 2px; }
.reply-quote-text { font-size: 12px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── CONTEXT MENU ── */
.msg-ctx-menu {
  position: fixed;
  z-index: 9000;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  min-width: 160px;
  animation: ctxFadeIn 0.12s ease;
}
@keyframes ctxFadeIn { from { opacity:0; transform:scale(0.92) } to { opacity:1; transform:scale(1) } }
.ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  color: #e2e8f0;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}
.ctx-item:hover { background: rgba(255,255,255,0.07); }
.ctx-item.danger { color: #f87171; }
.ctx-item.danger:hover { background: rgba(248,113,113,0.1); }

/* ── TEPKİ PİCKER ── */
.reaction-picker {
  position: fixed;
  z-index: 9001;
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 30px;
  padding: 6px 10px;
  display: flex;
  gap: 4px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
  animation: ctxFadeIn 0.12s ease;
}
.reaction-pick-btn {
  background: none; border: none; cursor: pointer;
  font-size: 24px; padding: 4px; border-radius: 50%;
  transition: transform 0.1s, background 0.1s;
}
.reaction-pick-btn:hover { transform: scale(1.25); background: rgba(255,255,255,0.08); }

/* ── TEPKİLER (mesaj altı) ── */
.msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.msg-reaction {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}
.msg-reaction:hover { background: rgba(99,102,241,0.2); }
.msg-reaction.mine {
  background: rgba(99,102,241,0.25);
  border-color: #6366f1;
}

/* ── TEPKİ EKLE BUTONU ── */
.react-add-btn {
  background: none; border: none; cursor: pointer;
  font-size: 14px; opacity: 0; transition: opacity 0.15s;
  padding: 2px 4px; border-radius: 6px;
  position: absolute; right: 6px; bottom: 28px;
}
.bubble { position: relative; }
.bubble:hover .react-add-btn { opacity: 0.6; }
.react-add-btn:hover { opacity: 1 !important; background: rgba(255,255,255,0.08); }

/* ── TICK (okundu) ── */
.msg-tick {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 3px;
}

/* ── İLETİLDİ ETİKETİ ── */
.forwarded-label {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 4px;
  font-style: italic;
}

/* ── YILDIZ ── */
.msg-starred { background: rgba(251,191,36,0.07) !important; }

/* ── İLET DİYALOG ── */
.forward-group-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  color: #e2e8f0;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 6px;
  transition: background 0.15s;
}
.forward-group-btn:hover { background: rgba(99,102,241,0.2); }

/* ── MESAJ ARAMA BARI ── */
.msg-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-secondary, #1e293b);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.msg-search-bar input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 7px 14px;
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
}
.msg-search-bar input::placeholder { color: #64748b; }
#msgSearchClose {
  background: none; border: none; color: #94a3b8; font-size: 18px;
  cursor: pointer; padding: 4px; border-radius: 50%;
  transition: color 0.15s;
}
#msgSearchClose:hover { color: #f87171; }

/* ══════════════════════════════════════════
   Yeni Özellikler – CSS (Tur 2)
   ══════════════════════════════════════════ */

/* ── GRUP LİSTESİ – YENİ TASARIM ── */
.groupItem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
  position: relative;
}
.groupItem:hover { background: rgba(255,255,255,0.04); }
.groupItem.pinned { background: rgba(99,102,241,0.06); }
.groupItem.pinned::before {
  content: "📌";
  position: absolute;
  top: 8px; right: 12px;
  font-size: 11px;
  opacity: 0.5;
}

.group-item-avatar { flex-shrink: 0; }
.group-avatar-img {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
}
.group-avatar-letter {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff;
}

.group-item-body { flex: 1; min-width: 0; }
.group-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3px;
}
.group-name-text {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.group-item-time {
  font-size: 11px;
  color: #64748b;
  flex-shrink: 0;
  margin-left: 8px;
}
.group-item-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
}
.group-last-msg {
  font-size: 13px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.unread-badge {
  color: #6366f1;
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

/* ── GRUP SUBTITLE ── */
#groupSubtitle {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

/* ── SESLİ MESAJ ── */
.msg-voice-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  min-width: 200px;
  max-width: 280px;
}
.voice-icon { font-size: 20px; flex-shrink: 0; }
.voice-audio {
  flex: 1;
  height: 32px;
  outline: none;
  border-radius: 8px;
}
.voice-audio::-webkit-media-controls-panel { background: rgba(99,102,241,0.15); }

/* Kayıt butonu aktifken */
#voiceBtn.recording {
  color: #f87171;
  animation: pulse 1s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }

/* Kayıt göstergesi */
.recording-indicator {
  background: rgba(248,113,113,0.15);
  border-left: 3px solid #f87171;
  padding: 6px 14px;
  font-size: 13px;
  color: #fca5a5;
  font-weight: 600;
}

/* ── EMOJİ PİCKER ── */
.emoji-picker-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 10px;
  background: #1e293b;
  border-top: 1px solid rgba(255,255,255,0.06);
  max-height: 180px;
  overflow-y: auto;
}
.emoji-item {
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  padding: 4px 5px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.1s, transform 0.1s;
}
.emoji-item:hover { background: rgba(255,255,255,0.08); transform: scale(1.2); }

/* ── SABİTLENMİŞ MESAJ BARI ── */
.pinned-msg-bar {
  background: rgba(99,102,241,0.1);
  border-left: 3px solid #6366f1;
  cursor: pointer;
  transition: background 0.15s;
}
.pinned-msg-bar:hover { background: rgba(99,102,241,0.18); }
.pinned-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
}
.pin-icon { font-size: 16px; flex-shrink: 0; }
.pinned-bar-text { flex: 1; min-width: 0; }
.pinned-bar-label {
  font-size: 10px;
  font-weight: 700;
  color: #818cf8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
}
.pinned-bar-content {
  font-size: 13px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.pinned-bar-close {
  background: none; border: none;
  color: #94a3b8; font-size: 14px;
  cursor: pointer; padding: 4px;
  border-radius: 50%; flex-shrink: 0;
  transition: color 0.15s;
}
.pinned-bar-close:hover { color: #f87171; }

/* ── MESAJ HIGHLIGHT (pinne tıklanınca) ── */
.highlight-msg .bubble {
  animation: highlightBubble 1.5s ease;
}
@keyframes highlightBubble {
  0%,100% { box-shadow: none; }
  30%     { box-shadow: 0 0 0 3px #6366f1; }
}

/* ── BTN-SECONDARY ── */
.btn-secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #e2e8f0;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-secondary.small { padding: 5px 10px; font-size: 13px; }

/* ══════════════════════════════════════════
   KİŞİLER SİSTEMİ CSS
   ══════════════════════════════════════════ */

.contacts-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.contacts-list {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}

.contact-letter-header {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 700;
  color: #6366f1;
  letter-spacing: 0.5px;
  background: rgba(99,102,241,0.06);
  position: sticky;
  top: 0;
  z-index: 1;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.contact-item:hover { background: rgba(255,255,255,0.04); }

.contact-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg,#6366f1,#8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}

.contact-info { flex: 1; min-width: 0; }
.contact-name {
  font-size: 15px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-email {
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.contact-dm-btn {
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: #818cf8;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.contact-dm-btn:hover {
  background: rgba(99,102,241,0.3);
  color: #c7d2fe;
}


/* ══════════════════════════════════════
   SPLASH SCREEN (5+6+2 Combo)
   ══════════════════════════════════════ */

.sp-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid rgba(99,102,241,0.5);
  width: 72px; height: 72px;
  animation: spRing 2.4s ease-out infinite;
}
.sp-ring:nth-child(2) { animation-delay: 0.6s; }
.sp-ring:nth-child(3) { animation-delay: 1.2s; }
@keyframes spRing {
  0%   { width: 72px;  height: 72px;  opacity: 0.7; }
  100% { width: 160px; height: 160px; opacity: 0;   }
}

.sp-combo-logo {
  animation: spMorph 3s ease-in-out infinite;
}
@keyframes spMorph {
  0%,100% { border-radius: 20px; }
  25%     { border-radius: 50%;  }
  50%     { border-radius: 8px;  }
  75%     { border-radius: 32px 8px; }
}

.sp-scanline {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #a5b4fc, transparent);
  animation: spScanline 1.6s ease-in-out infinite;
}
@keyframes spScanline {
  0%   { top: -3px; opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

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

/* ══════════════════════════════════════
   YENİ KULLANICI KARŞILAMA (7)
   ══════════════════════════════════════ */

.wb {
  padding: 10px 16px;
  border-radius: 18px;
  font-size: 14px;
  color: #e2e8f0;
  max-width: 88%;
  opacity: 0;
  transform: translateY(10px) scale(0.93);
  transition: opacity 0.4s cubic-bezier(0.34,1.3,0.64,1),
              transform 0.4s cubic-bezier(0.34,1.3,0.64,1);
}
.wb.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.wb-l { background: #1e293b; border-radius: 4px 18px 18px 18px; }
.wb-r { background: #6366f1; border-radius: 18px 4px 18px 18px; align-self: flex-end; }

/* ═══════════════════════════════════════════════
   ANİMASYON PAKETİ — CSS ONLY (app mantığı sağlam)
   ═══════════════════════════════════════════════ */

/* ── Shimmer keyframe (skeleton için) ── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}

/* 5 - Skeleton: grup listesi */
.skeleton-item {
  height: 68px;
  margin: 4px 10px;
  border-radius: 14px;
  background: linear-gradient(90deg,
    rgba(30,41,59,0.8) 25%,
    rgba(51,65,85,0.9) 50%,
    rgba(30,41,59,0.8) 75%);
  background-size: 1200px 100%;
  animation: shimmer 1.5s infinite linear;
}

/* 5 - Skeleton: mesaj alanı */
.msg-skeleton {
  height: 42px;
  width: 52%;
  margin: 10px 16px;
  border-radius: 18px 18px 18px 4px;
  background: linear-gradient(90deg,
    rgba(30,41,59,0.8) 25%,
    rgba(51,65,85,0.9) 50%,
    rgba(30,41,59,0.8) 75%);
  background-size: 1200px 100%;
  animation: shimmer 1.5s infinite linear;
}
.msg-skeleton--mine {
  margin-left: auto;
  margin-right: 16px;
  width: 48%;
  border-radius: 18px 18px 4px 18px;
  animation-delay: 0.2s;
}

/* 1 - Typing dots */
.typing-indicator {
  padding: 4px 16px 6px;
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.typing-indicator.hidden { display: none; }
.typing-label { font-size: 12px; color: #94a3b8; font-style: italic; }
.typing-dots { display: flex; align-items: center; gap: 4px; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6366f1; display: inline-block;
  animation: typingBounce 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%,60%,100% { transform: translateY(0);    opacity: 0.5; }
  30%          { transform: translateY(-6px); opacity: 1;   }
}

/* 2 - Gönder butonu ripple */
.messageBox button#sendBtn {
  position: relative;
  overflow: hidden;
}
.messageBox button#sendBtn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 22px;
  background: radial-gradient(circle at center,
    rgba(255,255,255,0.35) 0%, transparent 70%);
  opacity: 0;
  transform: scale(0);
  transition: transform 0.4s ease, opacity 0.4s ease;
}
.messageBox button#sendBtn:active::after {
  transform: scale(2.5);
  opacity: 1;
  transition: 0s;
}

/* 3 - Unread badge pulse */
.unread-badge {
  display: inline-block;
  animation: unreadPulse 2s ease-in-out infinite;
}
@keyframes unreadPulse {
  0%,100% { transform: scale(1);   }
  50%      { transform: scale(1.4); }
}

/* 4 - Mesaj fade-in (spring yok — sadece opacity, layout bozmaz) */
.message-row {
  animation: msgFadeIn 0.2s ease both;
}
@keyframes msgFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* 6 - Online dot (DM listesi) */
.dm-avatar-wrap { position: relative; display: inline-flex; }
.dm-online-dot {
  position: absolute; bottom: 0; right: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: #22c55e;
  border: 2px solid #0f172a;
  animation: onlinePop 2.5s ease-in-out infinite;
}
@keyframes onlinePop {
  0%,100% { transform: scale(1);   }
  50%      { transform: scale(1.3); }
}

/* 7 - Reaksiyon pop */
.msg-reaction {
  animation: reactionPop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes reactionPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* 8 - Arama halka dalgası */
.call-avatar {
  position: relative;
}
.call-avatar::before,
.call-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(59,130,246,0.5);
  animation: callRingWave 2s infinite;
}
.call-avatar::after { animation-delay: 0.7s; }
@keyframes callRingWave {
  0%   { transform: scale(1);   opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0;   }
}

/* 9 - Upload progress bar */
.upload-progress-wrap {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 8000;
  background: rgba(15,23,42,0.97);
  border-top: 1px solid rgba(99,102,241,0.3);
  padding: 10px 20px 14px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34,1.2,0.64,1);
}
.upload-progress-wrap.visible { transform: translateY(0); }
.upload-progress-info {
  display: flex; justify-content: space-between;
  font-size: 12px; color: #94a3b8;
}
.upload-progress-filename {
  font-weight: 500; color: #e2e8f0; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%;
}
.upload-progress-track {
  height: 3px; background: rgba(255,255,255,0.08);
  border-radius: 3px; overflow: hidden;
}
.upload-progress-bar {
  height: 100%; width: 0%; background: #6366f1;
  border-radius: 3px; transition: width 0.3s ease;
}

/* 10 - Toast slide-in iyileştirme */
.toast { border-radius: 12px !important; }
.toast-info    { border-left: 3px solid #6366f1 !important; }
.toast-success { border-left: 3px solid #22c55e !important; }
.toast-error   { border-left: 3px solid #ef4444 !important; }

/* 11 - Okundu çift tik */
.msg-ticks {
  display: inline-flex; align-items: center;
  gap: 1px; margin-left: 4px; vertical-align: middle;
}
.tick {
  display: inline-block; width: 5px; height: 9px;
  border-right: 1.8px solid #64748b;
  border-bottom: 1.8px solid #64748b;
  transform: rotate(45deg) scale(0);
  animation: tickAppear 0.3s cubic-bezier(0.34,1.56,0.64,1) 0.2s forwards;
}
.tick.t2 { border-color: #818cf8; animation-delay: 0.45s; }
@keyframes tickAppear {
  to { transform: rotate(45deg) scale(1); }
}

/* 13 - Mesaj silinme */
.msg-deleting {
  animation: msgDeleteAnim 0.35s cubic-bezier(0.55,0,1,0.45) forwards;
  overflow: hidden; pointer-events: none;
}
@keyframes msgDeleteAnim {
  0%   { transform: scale(1);   opacity: 1; max-height: 120px; }
  100% { transform: scale(0.7); opacity: 0; max-height: 0; margin: 0; padding: 0; }
}

/* 15 - Konfeti */
.confetti-particle {
  position: fixed; pointer-events: none; z-index: 99999;
  animation: confettiDrop linear forwards;
}
@keyframes confettiDrop {
  0%   { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(300px) rotate(540deg); }
}

/* 16 - Ses mesajı custom player */
.msg-voice-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(99,102,241,0.08);
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 18px; min-width: 210px; max-width: 290px;
  user-select: none;
}
.voice-play-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #6366f1; border: 2px solid #6366f1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative; overflow: hidden;
  transition: border-radius 0.4s cubic-bezier(0.4,0,0.2,1), transform 0.15s;
}
.voice-play-btn.playing { border-radius: 50%; }
.voice-play-btn:active { transform: scale(0.93); }
.voice-play-btn .vbtn-fill {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 0%; background: rgba(255,255,255,0.22);
  transition: height 0.12s linear; border-radius: 0;
  pointer-events: none;
}
.voice-play-btn .vbtn-ripple {
  position: absolute; inset: -4px;
  border-radius: 50%; border: 2px solid #6366f1;
  opacity: 0; pointer-events: none;
}
.voice-play-btn.playing .vbtn-ripple { animation: vRipple 1.8s ease-out infinite; }
.voice-play-btn.playing .vbtn-ripple:nth-child(2) { animation-delay: 0.6s; }
.voice-play-btn.playing .vbtn-ripple:nth-child(3) { animation-delay: 1.2s; }
@keyframes vRipple { 0%{transform:scale(1);opacity:.6} 100%{transform:scale(2.2);opacity:0} }
.voice-play-btn .vbtn-icon { position: relative; z-index: 1; pointer-events: none; }
.voice-waveform {
  flex: 1; display: flex; align-items: center;
  gap: 2px; height: 28px; cursor: pointer;
}
.voice-waveform-bar {
  width: 3px; border-radius: 2px;
  background: rgba(99,102,241,0.25); flex-shrink: 0;
  transition: background 0.1s, transform 0.1s;
}
.voice-waveform-bar.played { background: #6366f1; }
.voice-waveform-bar.active {
  background: #818cf8;
  animation: waveBarPulse 0.5s ease-in-out infinite alternate;
}
@keyframes waveBarPulse { from { transform: scaleY(0.7); opacity: 0.7; } to { transform: scaleY(1); opacity: 1; } }
.voice-time { font-size: 11px; color: #94a3b8; min-width: 28px; text-align: right; }

/* 17 - Link preview */
.msg-link-preview {
  margin-top: 6px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px; overflow: hidden;
  max-width: 260px; cursor: pointer;
  animation: previewFold 0.35s cubic-bezier(0.34,1.3,0.64,1) both;
}
.msg-link-preview:hover { border-color: rgba(99,102,241,0.4); }
.msg-link-preview-body {
  padding: 7px 10px;
  background: rgba(255,255,255,0.04);
}
.msg-link-preview-title {
  font-size: 12px; font-weight: 500; color: #e2e8f0;
  margin-bottom: 2px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.msg-link-preview-url {
  font-size: 11px; color: #6366f1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@keyframes previewFold {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 18 - Bildirim izin banner */
.notif-permission-banner {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8500;
  background: rgba(15,23,42,0.97);
  border-bottom: 1px solid rgba(99,102,241,0.3);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.34,1.2,0.64,1);
}
.notif-permission-banner.visible { transform: translateY(0); }
.notif-perm-txt { flex: 1; font-size: 13px; color: #e2e8f0; }
.notif-perm-txt span { display: block; font-size: 11px; color: #64748b; }
.notif-perm-btn {
  background: #6366f1; color: white; border: none;
  border-radius: 8px; padding: 6px 14px;
  font-size: 12px; font-weight: 500; cursor: pointer;
}
.notif-perm-close {
  background: none; border: none; color: #64748b;
  cursor: pointer; font-size: 16px; padding: 4px;
}

/* 19 - Tema geçiş flash */
.theme-transition-overlay {
  position: fixed; inset: 0; z-index: 99998;
  pointer-events: none; background: #f8fafc;
  opacity: 0; transition: opacity 0.35s ease;
}
.theme-transition-overlay.flash { opacity: 0.6; }

/* 20 - Scroll to bottom FAB */
.scroll-bottom-fab {
  position: absolute; bottom: 80px; right: 16px;
  width: 40px; height: 40px; border-radius: 50%;
  background: #6366f1; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transform: scale(0) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
  opacity: 0; z-index: 100;
}
.scroll-bottom-fab.visible {
  transform: scale(1) translateY(0); opacity: 1;
  animation: fabFloat 2s ease-in-out infinite;
}
@keyframes fabFloat {
  0%,100% { box-shadow: 0 4px 14px rgba(99,102,241,0.4); }
  50%      { box-shadow: 0 8px 20px rgba(99,102,241,0.6);
             transform: scale(1) translateY(-3px); }
}
.fab-unread-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: white; font-size: 10px;
  font-weight: 600; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; padding: 0 3px;
}

/* 12 - Swipe to reply hint */
.swipe-reply-hint {
  position: absolute; left: 6px; top: 50%;
  transform: translateY(-50%) scale(0);
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.4);
  border-radius: 50%; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s;
  opacity: 0;
}
.swipe-reply-hint.active {
  transform: translateY(-50%) scale(1); opacity: 1;
}
