:root {
  --bg: #eef0f5;
  --bg-dot: rgba(120, 110, 200, 0.08);
  --panel: #ffffff;
  --panel-2: #f5f5fa;
  --border: #e5e5ee;
  --text: #2b2a38;
  --text-muted: #8b8a9a;
  --accent: #6c5ce7;
  --accent-2: #a29bfe;
  --green: #2ecc71;
  --muted-nick: #55545f;
  --font: 'Poppins', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.entry {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.mark-bubble {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.mark-bubble svg { width: 28px; height: 28px; }
.entry-mark { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.entry-mark h1 { font-size: 26px; font-weight: 800; margin: 0; }
.entry-tagline { margin: 0; color: var(--text-muted); font-size: 14px; }
.entry-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 10px 40px -20px rgba(43,42,56,0.2);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.field-label em { font-style: normal; opacity: .7; font-weight: 400; }
.field { position: relative; }
.field input {
  height: 52px; border-radius: 14px; border: 1.5px solid var(--border);
  background: var(--panel-2); color: var(--text); font-size: 15px;
  padding: 0 16px 0 44px; outline: none; width: 100%; font-family: var(--font);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input:focus {
  border-color: var(--accent);
  background: var(--panel);
  box-shadow: 0 0 0 4px rgba(108,92,231,0.14);
}
.field::before {
  content: '';
  position: absolute;
  left: 15px; top: 38px;
  width: 18px; height: 18px;
  background-repeat: no-repeat; background-position: center; background-size: contain;
  opacity: 0.55;
  pointer-events: none;
  z-index: 1;
}
.field:nth-of-type(1)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='8' r='4' stroke='%236c5ce7' stroke-width='1.8'/%3E%3Cpath d='M4 20c0-4 3.5-6 8-6s8 2 8 6' stroke='%236c5ce7' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
.field:nth-of-type(2)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Crect x='5' y='11' width='14' height='9' rx='2' stroke='%236c5ce7' stroke-width='1.8'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3' stroke='%236c5ce7' stroke-width='1.8'/%3E%3C/svg%3E");
}
.entry-cta {
  height: 52px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-weight: 700; font-size: 15px; cursor: pointer; width: 100%;
  box-shadow: 0 16px 32px -14px rgba(108,92,231,0.55);
  transition: transform .12s ease, box-shadow .12s ease;
}
.entry-cta:hover { transform: translateY(-1px); box-shadow: 0 20px 40px -14px rgba(108,92,231,0.65); }
.entry-status, .entry-error { margin: 0; text-align: center; font-size: 13px; }
.entry-status { color: var(--accent); }
.entry-error { color: #e74c3c; }
.entry-status:empty, .entry-error:empty { display: none; }
.entry-foot { margin: 0; text-align: center; font-size: 12.5px; color: var(--text-muted); }

.chat {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: radial-gradient(var(--bg-dot) 1.4px, transparent 1.4px);
  background-size: 22px 22px;
  background-color: var(--bg);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tb-icon {
  width: 32px; height: 32px; border: none; background: transparent;
  border-radius: 9px; color: var(--text); display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.tb-icon:hover { background: var(--panel-2); }
.tb-icon svg { width: 17px; height: 17px; }
.hash-icon { font-size: 17px; font-weight: 800; line-height: 1; }
.tb-spacer { flex: 1; }
.tb-status {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; color: var(--text);
  background: var(--panel-2); padding: 4px 10px; border-radius: 999px; margin-left: 4px;
  white-space: nowrap;
}
.tb-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
#radioBtn { position: relative; color: var(--accent); }
#radioBtn .radio-play { width: 18px; height: 18px; }
#radioBtn .radio-bars {
  display: flex; align-items: flex-end; gap: 2px; height: 16px;
}
#radioBtn .radio-bars[hidden] { display: none !important; }
#radioBtn .radio-bars span {
  width: 3px; background: var(--accent); border-radius: 2px;
  animation: radioBar 0.9s ease-in-out infinite;
}
#radioBtn .radio-bars span:nth-child(1) { height: 6px; animation-delay: 0s; }
#radioBtn .radio-bars span:nth-child(2) { height: 14px; animation-delay: .15s; }
#radioBtn .radio-bars span:nth-child(3) { height: 9px; animation-delay: .3s; }
@keyframes radioBar {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.join-modal {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(20,18,35,0.55);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.join-modal.open { display: flex; }
.join-modal-inner {
  background: var(--panel); border-radius: 18px; padding: 22px;
  width: 100%; max-width: 320px;
  display: flex; flex-direction: column; gap: 14px;
}
.join-modal-inner h3 { margin: 0; font-size: 16px; font-weight: 700; }
.join-modal-field {
  display: flex; align-items: center; gap: 4px;
  height: 46px; border: 1px solid var(--border); border-radius: 10px;
  padding: 0 14px; background: var(--panel-2);
}
.join-modal-field span { color: var(--text-muted); font-weight: 700; }
.join-modal-field input {
  border: none; background: transparent; outline: none;
  color: var(--text); font-size: 15px; width: 100%; font-family: var(--font);
}
.join-modal-actions { display: flex; gap: 8px; }
.join-modal-actions button {
  flex: 1; height: 42px; border: none; border-radius: 10px;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
#joinModalCancel { background: var(--panel-2); color: var(--text); }
#joinModalSubmit { background: linear-gradient(135deg, var(--accent), #a29bfe); color: #fff; }

.tb-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--text); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; margin-left: 6px; flex-shrink: 0;
  cursor: pointer; overflow: hidden;
}
.tb-avatar img { width: 100%; height: 100%; object-fit: cover; }

.pm-offline-notice {
  background: #fff4e6; color: #b8720a; font-size: 12px; font-weight: 600;
  padding: 7px 14px; text-align: center; border-bottom: 1px solid #ffe0b3;
  flex-shrink: 0;
}

/* ---- Toast bildirim sistemi ---- */
.toast-wrap {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast-wrap { max-width: calc(100vw - 24px); }
.toast {
  background: var(--panel); color: var(--text); font-size: 13px; font-weight: 600;
  border: 1px solid var(--border);
  padding: 10px 18px; border-radius: 16px; box-shadow: 0 8px 24px -8px rgba(0,0,0,0.35);
  opacity: 0; transform: translateY(-12px); transition: opacity .25s ease, transform .25s ease;
  white-space: normal; text-align: center; max-width: 100%; box-sizing: border-box;
}

/* ---- İnce, tasarımsal scrollbar ---- */
.stream, .panel-list {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.stream::-webkit-scrollbar, .panel-list::-webkit-scrollbar {
  width: 6px;
}
.stream::-webkit-scrollbar-track, .panel-list::-webkit-scrollbar-track {
  background: transparent;
}
.stream::-webkit-scrollbar-thumb, .panel-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}
.stream::-webkit-scrollbar-thumb:hover, .panel-list::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-error { background: #e74c3c; color: #fff; border-color: #e74c3c; }

/* ---- Profil menüsü ---- */
.palette-menu {
  position: fixed; top: 52px; right: 10px; z-index: 90;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.35);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.palette-menu-title { font-size: 13px; font-weight: 700; color: var(--text); }
.palette-grid { display: flex; gap: 8px; }
.palette-swatch {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  cursor: pointer; transition: transform .15s ease;
}
.palette-swatch:hover { transform: scale(1.12); }
.palette-swatch.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.profile-menu {
  position: fixed; top: 52px; right: 10px; z-index: 90;
  background: var(--panel); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.35);
  width: 240px; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.profile-menu-header { display: flex; align-items: center; gap: 10px; }
.profile-menu-avatar {
  width: 48px; height: 48px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 19px;
}
.profile-menu-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-menu-header-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.profile-menu-nick { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-menu-about { font-size: 12px; color: var(--text-muted); line-height: 1.4; }
.profile-menu-status {
  font-size: 11px; font-weight: 700; color: var(--accent);
  background: rgba(108,92,231,0.1); padding: 2px 9px; border-radius: 999px;
  align-self: flex-start;
}
.profile-menu-divider { width: 100%; height: 1px; background: var(--border); }
.profile-menu-item {
  width: 100%; height: 36px; border: none; background: transparent;
  border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--text);
  cursor: pointer; text-align: left; padding: 0 10px;
}
.profile-menu-item:hover { background: var(--panel-2); }

.channel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 38px;
  box-sizing: border-box;
}
.channel-head .ch-info {
  flex: 1;
  min-width: 0;
}
.ch-count {
  display: flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, var(--accent), #a29bfe);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px -2px rgba(108,92,231,0.6);
}
.ch-count::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: #fff; opacity: 0.85;
}
.ch-info { display: flex; flex-direction: column; min-width: 0; }
.ch-info strong { font-size: 13px; }
.ch-info span { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-close-pm {
  margin-left: auto; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%; border: none;
  background: var(--panel-2); color: var(--text-muted);
  font-size: 16px; line-height: 1; cursor: pointer;
}
.ch-close-pm:hover { background: var(--border); color: var(--text); }

.mobile-channel-tabs {
  display: flex; gap: 6px; padding: 7px 10px;
  overflow-x: auto; background: var(--panel); border-bottom: 1px solid var(--border);
  flex-shrink: 0; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.mobile-channel-tabs::-webkit-scrollbar { display: none; }
.mobile-tab {
  flex-shrink: 0; padding: 6px 14px; border-radius: 999px; border: none;
  background: var(--panel-2); color: var(--text-muted); font-size: 12.5px; font-weight: 600;
  white-space: nowrap; cursor: pointer; font-family: var(--font);
}
.mobile-tab.active { background: linear-gradient(135deg, var(--accent), #a29bfe); color: #fff; }
@media (min-width: 980px) {
  .mobile-channel-tabs { display: none; }

}


.chat-body { flex: 1; display: flex; min-height: 0; position: relative; }

.stream-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.stream {
  flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 3px;
  position: relative;
background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23808080' stroke-opacity='0.09' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M20 15 Q28 5 36 15 Q30 22 20 15Z'/%3E%3Cpath d='M100 20 Q108 10 116 20 Q110 27 100 20Z'/%3E%3Cpath d='M50 60 Q58 50 66 60 Q60 67 50 60Z'/%3E%3Cpath d='M130 70 Q138 60 146 70 Q140 77 130 70Z'/%3E%3Cpath d='M15 100 Q23 90 31 100 Q25 107 15 100Z'/%3E%3Cpath d='M90 120 Q98 110 106 120 Q100 127 90 120Z'/%3E%3Ccircle cx='60' cy='20' r='2.5'/%3E%3Ccircle cx='10' cy='55' r='2'/%3E%3Ccircle cx='140' cy='40' r='2.3'/%3E%3Ccircle cx='75' cy='95' r='2'/%3E%3Ccircle cx='150' cy='115' r='2.4'/%3E%3Ccircle cx='35' cy='140' r='2.2'/%3E%3Cpath d='M0 40 Q10 35 20 40 Q10 45 0 40'/%3E%3Cpath d='M110 5 Q120 0 130 5 Q120 10 110 5'/%3E%3Cpath d='M40 85 Q50 80 60 85 Q50 90 40 85'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-attachment: local;
  background-size: 160px 160px;
}

.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; margin-top: 7px; }
.msg-header-row {
  display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
}
.msg-header-row .pill-avatar {
  width: 20px; height: 20px; font-size: 10px; flex-shrink: 0;
}
.msg-nick-pill {
  display: inline-flex; align-items: center; padding: 3px 11px;
  border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff;
}
.msg-nick-pill:hover { text-decoration: underline; }

.panel-row.highlight-flash {
  background: rgba(108,92,231,0.22) !important;
  box-shadow: 0 0 0 2px var(--accent);
  animation: highlightPulse 2.2s ease;
}
@keyframes highlightPulse {
  0% { background: rgba(108,92,231,0.35); }
  100% { background: rgba(108,92,231,0.22); }
}
.msg-bubble {
  background: var(--panel);
  border-radius: 4px 12px 12px 12px;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 2;
  word-break: break-word;
  max-width: 100%;
  overflow: hidden;
  font-weight: 500;
}
.msg-time {
  float: right;
  clear: both;
  font-size: 9.5px;
  color: var(--text-muted);
  margin-left: 8px;
  margin-top: 3px;
}
.msg-system { align-self: flex-start; font-size: 11px; color: var(--text-muted); padding: 2px; margin: 2px 0; }
.sys-link { color: var(--accent); font-weight: 700; cursor: pointer; }
.sys-link:hover { text-decoration: underline; }

.composer {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: var(--panel); border-top: 1px solid var(--border); flex-shrink: 0;
  position: relative;
  z-index: 210;
}
.cp-icon {
  width: 32px; height: 32px; border: none; background: transparent;
  color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.cp-icon svg { width: 18px; height: 18px; }
.composer input {
  flex: 1; height: 40px; border: 1px solid var(--border);
  background: var(--panel-2); border-radius: 20px; padding: 0 14px;
  color: var(--text); font-size: 14px; outline: none; font-family: var(--font); min-width: 0;
}
.composer input:focus { border-color: var(--accent); }
.cp-send {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.cp-send svg { width: 16px; height: 16px; }

.chat-body { align-items: stretch; }
.users-panel, .channels-panel {
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  width: 0;
  align-self: stretch;
  overflow: hidden;
  transition: width .22s ease;
  flex-shrink: 0;
}
.users-panel.open, .channels-panel.open { width: 175px; }
@media (max-width: 480px) {
  .users-panel.open, .channels-panel.open { width: 155px; }
}

.panel-tabs { display: flex; padding: 8px 8px 0; gap: 3px; flex-shrink: 0; }
.panel-tabs.single { padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.panel-tab {
  flex: 1; height: 32px; border: none; border-radius: 8px; background: transparent;
  color: var(--text-muted); font-size: 11.5px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
}
.panel-tab.active { background: rgba(108,92,231,0.1); color: var(--accent); }
.panel-tab span { background: var(--accent); color: #fff; font-size: 9.5px; font-weight: 700; padding: 1px 5px; border-radius: 999px; }

.panel-search {
  display: flex; align-items: center; gap: 6px;
  margin: 8px 10px; padding: 0 10px; height: 32px;
  border-radius: 8px; background: var(--panel-2); border: 1px solid var(--border);
  color: var(--text-muted); flex-shrink: 0;
}
.panel-search svg { width: 13px; height: 13px; flex-shrink: 0; }
.panel-search input { border: none; background: transparent; outline: none; color: var(--text); font-size: 12px; width: 100%; font-family: var(--font); }

.panel-section-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  color: var(--text-muted); padding: 10px 12px 4px; flex-shrink: 0; white-space: nowrap;
}
.panel-section-label span { background: var(--panel-2); padding: 1px 6px; border-radius: 999px; font-size: 9.5px; }
.pm-label { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 10px; }

.panel-list { overflow-y: auto; padding: 3px 6px; display: flex; flex-direction: column; gap: 1px; flex: 1 1 0; min-height: 0; }
.panel-list:first-of-type { flex: 1; }

.panel-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 7px; border-radius: 4px; cursor: pointer;
  color: var(--text); background: transparent; border: none; width: 100%; text-align: left;
  font-family: var(--font); white-space: nowrap;
}
.panel-row:hover { background: var(--panel-2); }
.panel-row.active { background: rgba(108,92,231,0.14); border-left: 3px solid var(--accent); padding-left: 4px; }
.panel-row.unread .row-name { color: var(--accent); font-weight: 700; }
.panel-row.pm-blink .row-name {
  color: var(--accent); font-weight: 700;
  animation: pmBlink 1s ease-in-out infinite;
}
@keyframes pmBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.row-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; overflow: hidden;
  text-align: center; line-height: 1;
}
.row-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.panel-row .row-name { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }
.vip-nick-wrap { display: inline-flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.panel-row .row-count { font-size: 10.5px; color: var(--text-muted); font-weight: 600; }
.rank-badge {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-sizing: border-box;
}
.panel-row .row-x {
  color: var(--text-muted); opacity: .55; width: 18px; height: 18px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; border-radius: 50%;
}
.panel-row .row-x:hover { opacity: 1; background: rgba(0,0,0,0.08); }

.join-btn {
  margin: 6px 12px; height: 32px; border: 1px dashed var(--border);
  border-radius: 8px; background: transparent; color: var(--accent);
  font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0;
}
.join-btn:hover { background: var(--panel-2); }

/* ---- Profil resmi modalı ---- */
.avatar-modal {
  position: fixed; inset: 0; background: rgba(20,18,35,0.65);
  z-index: 150; display: none; align-items: center; justify-content: center;
}
.avatar-modal.open { display: flex; }
.avatar-modal-inner {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: relative; max-width: 92vw; max-height: 92vh;
}
.avatar-modal-close {
  position: absolute; top: -14px; right: -14px;
  width: 32px; height: 32px; border: none; background: #fff;
  border-radius: 50%; font-size: 18px; color: var(--text); cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
}
.avatar-modal-body img {
  max-width: 92vw; max-height: 80vh;
  width: auto; height: auto;
  display: block;
  border-radius: 4px;
}
.avatar-modal-fallback {
  width: 220px; height: 220px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 72px; font-weight: 800;
}
.avatar-modal-nick { font-size: 14px; font-weight: 700; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.5); }

@media (max-width: 979px) {
  .channel-head { min-height: 30px; padding: 4px 12px; }
  .ch-count { display: none; }
  .panel-row { padding: 3px 6px; gap: 6px; }
  .panel-row .row-avatar { width: 22px; height: 22px; font-size: 9.5px; }
  .panel-row .row-name { font-size: 11.5px; }
  .panel-list { gap: 0; padding: 2px 5px; }
.users-panel {
    position: fixed !important;
    top: var(--channel-head-height, 46px); right: 0; bottom: 0;
    height: auto;
    z-index: 200;
    box-shadow: -10px 0 30px -14px rgba(0,0,0,0.35);
  }
  body:has(#usersPanel.open) .stream {
    margin-right: 155px;
  }
}

.users-panel.force-hidden { display: none !important; }

@media (min-width: 980px) {
  .tb-icon#menuBtn, .tb-icon#usersBtn { display: none; }
  .users-panel, .channels-panel { width: 190px; overflow: visible; }
}


/* ---- Ayarlar Modalı ---- */
.settings-modal {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(20,18,35,0.55);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.settings-modal.open { display: flex; }
.settings-modal-inner {
  background: var(--panel); border-radius: 18px; padding: 22px;
  width: 100%; max-width: 380px; max-height: 85vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
}
.settings-modal-header {
  display: flex; align-items: center; justify-content: space-between;
}
.settings-modal-header h3 { margin: 0; font-size: 17px; font-weight: 700; }
.settings-close-x {
  width: 28px; height: 28px; border-radius: 50%; border: none;
  background: var(--panel-2); color: var(--text-muted); font-size: 16px; cursor: pointer;
}
.settings-sub { margin: -8px 0 0; font-size: 12.5px; color: var(--text-muted); }
.settings-section { display: flex; flex-direction: column; gap: 8px; }
.settings-section label {
  font-size: 12.5px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .03em;
}
.settings-select {
  height: 42px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--panel-2); color: var(--text); font-size: 14px; padding: 0 12px;
  font-family: var(--font);
}
.settings-toggles { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--border); padding-top: 8px; }
.settings-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2px 2px; font-size: 13.5px; color: var(--text); cursor: pointer;
}
.settings-toggle input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.settings-toggle:has(#toggleChannelsOnTop) input {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 22px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  cursor: pointer;
  transition: background .2s ease;
  flex-shrink: 0;
}
.settings-toggle:has(#toggleChannelsOnTop) input::before {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px -1px rgba(0,0,0,0.4);
  transition: transform .2s ease;
}
.settings-toggle:has(#toggleChannelsOnTop) input:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.settings-toggle:has(#toggleChannelsOnTop) input:checked::before {
  transform: translateX(18px);
}
.settings-links { display: flex; gap: 10px; border-top: 1px solid var(--border); padding-top: 12px; }
.settings-links button {
  flex: 1; height: 38px; border: 1px dashed var(--border); border-radius: 10px;
  background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.settings-actions { display: flex; gap: 10px; }
.settings-actions button {
  flex: 1; height: 44px; border: none; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer;
}
#settingsCancel { background: var(--panel-2); color: var(--text); }
#settingsOk { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }

.pref-hide-timestamps .msg-time { display: none !important; }
/* ---- 5 hazır palet: 2 koyu, 3 açık ---- */
body.palette-d1 {
  --bg: #12151f; --panel: #171b28; --panel-2: #1e2333;
  --text: #eef1f8; --text-muted: #8d94ac; --border: rgba(255,255,255,0.06);
  --accent: #8c7bff; --accent-2: #ff5f96; --muted-nick: #5c6483;
}
body.palette-d2 {
  --bg: #0f1a1e; --panel: #16262c; --panel-2: #1c3038;
  --text: #e8f4f2; --text-muted: #7fa39b; --border: rgba(255,255,255,0.08);
  --accent: #2a9d94; --accent-2: #6fc9c1; --muted-nick: #9fc3bd;
}
body.palette-l1 {
  --bg: #faf7f5; --panel: #ffffff; --panel-2: #f3eee9;
  --text: #2b2a38; --text-muted: #8b8a9a; --border: rgba(43,42,56,0.08);
  --accent: #6c5ce7; --accent-2: #a29bfe; --muted-nick: #55545f;
}
body.palette-l2 {
  --bg: #f4faf8; --panel: #ffffff; --panel-2: #e8f5f0;
  --text: #1f3a34; --text-muted: #6d8a82; --border: rgba(31,58,52,0.08);
  --accent: #3fa88a; --accent-2: #8fd4bc; --muted-nick: #3a5a52;
}
body.palette-l3 {
  --bg: #fff6f3; --panel: #ffffff; --panel-2: #fbe8e0;
  --text: #3a2a26; --text-muted: #9a7a70; --border: rgba(58,42,38,0.08);
  --accent: #e88b7d; --accent-2: #f4bfae; --muted-nick: #6b524a;
}

/* ============ MOBİL: Özel Mesajlar (üstten açılan panel) ============ */
.mobile-pm-trigger { position: relative; }
.mobile-pm-badge {
  position: absolute; top: 1px; right: 1px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff5f6d, #e63950);
  color: #fff;
  font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--panel);
  box-shadow: 0 2px 6px rgba(230,57,80,0.5);
}
.mobile-pm-badge[hidden] { display: none; }
.mobile-pm-badge.blinking { animation: mobilePmBadgeBlink 1.1s ease-in-out infinite; }
@keyframes mobilePmBadgeBlink { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.85); } }
.mobile-pm-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,12,25,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 125;
}
.mobile-pm-panel {
  display: none;
  position: fixed; top: 0; left: 0; right: 0;
  max-height: 75vh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: 0 0 22px 22px;
  z-index: 126;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,0.5);
  transform: translateY(-100%);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
}
body.mobile-pm-open .mobile-pm-backdrop { display: block; }
body.mobile-pm-open .mobile-pm-panel { display: flex; flex-direction: column; transform: translateY(0); }
.mobile-pm-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 16px 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 0 0 22px 22px;
  position: sticky; top: 0; z-index: 1;
  box-shadow: 0 8px 20px -12px rgba(0,0,0,0.35);
}
.mobile-pm-panel-title { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 800; color: #fff; }
.mobile-pm-panel-title svg { width: 19px; height: 19px; flex-shrink: 0; }
.mobile-pm-close {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1; color: #fff;
  background: rgba(255,255,255,0.18); border: none; cursor: pointer;
  transition: background .15s ease;
}
.mobile-pm-close:hover { background: rgba(255,255,255,0.3); }
#pmListMobile { padding: 6px 8px 10px; gap: 2px; flex: 0 1 auto !important; min-height: auto !important; }
#pmListMobile .panel-row { border-radius: 12px; padding: 9px 8px; }
#pmListMobile .panel-row:hover { background: var(--panel-2); }
#pmListMobile .row-avatar { width: 34px; height: 34px; font-size: 13px; }
#pmListMobile .row-name { font-size: 13.5px; font-weight: 600; }
#pmListMobile:empty::after {
  content: 'Henüz özel mesajın yok';
  display: block;
  text-align: center;
  padding: 34px 20px;
  font-size: 13px; font-weight: 600;
  color: var(--text-muted);
}
@media (min-width: 980px) {
  .mobile-pm-trigger, .mobile-pm-backdrop, .mobile-pm-panel { display: none !important; }
}

/* ============ Yazıyor göstergesi ============ */
.typing-indicator {
  padding: 4px 16px;
  font-size: 12px; font-weight: 600;
  color: var(--accent);
  min-height: 18px;
  display: flex; align-items: center; gap: 6px;
  flex-shrink: 0;
}
.typing-indicator[hidden] { display: none; }
.typing-indicator::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  animation: typingDotPulse 1s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes typingDotPulse { 0%, 100% { opacity: 0.3; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.15); } }


/* ============ Sistem mesajı renkleri (join/part/quit/mode/notice) ============ */
.msg-system-join .sys-link, .msg-system-join .sys-plain { color: #2ecc71; font-weight: 700; }
.msg-system-part .sys-link, .msg-system-part .sys-plain { color: #e8918a; font-weight: 700; }
.msg-system-quit .sys-link, .msg-system-quit .sys-plain { color: #e74c3c; font-weight: 700; }
.msg-system-kick .sys-link, .msg-system-kick .sys-plain { color: #e74c3c; font-weight: 700; }
.msg-system-mode .sys-link, .msg-system-mode .sys-plain { color: var(--accent); font-weight: 700; }
.msg-system-nickchange .sys-link, .msg-system-nickchange .sys-plain { color: var(--text-muted); font-weight: 700; }
.sys-plain { cursor: default; }
.msg-system-notice-chanserv { color: #3B82F6; font-weight: 600; }
.msg-system-notice-nickserv { color: #D6336C; font-weight: 600; }
.msg-system-notice-other { color: var(--text-muted); }

.sys-nick-new { color: #3B82F6 !important; }
.msg-system-mode .sys-link, .msg-system-mode .sys-plain { color: #3B82F6; }


/* ============ Profil görüntüleme modalı (sosyal medya tarzı) ============ */
.profile-view-modal {
  display: none;
  position: fixed; inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(60,50,90,0.55), rgba(10,8,18,0.75));
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 140;
  align-items: center; justify-content: center;
  padding: 20px;
}
.profile-view-modal.open { display: flex; }
@keyframes pvPopIn {
  from { opacity: 0; transform: translateY(18px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pv-card {
  width: 100%; max-width: 430px;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--panel);
  border-radius: 26px;
  box-shadow: 0 40px 90px -24px rgba(0,0,0,0.6), 0 0 0 1px var(--border);
  position: relative;
  animation: pvPopIn .28s cubic-bezier(.2,.9,.3,1.2);
}
.pv-loading {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px; font-weight: 700;
  letter-spacing: .02em;
}
.pv-cover {
  height: 176px;
  background-size: cover;
  background-position: center;
  border-radius: 26px 26px 0 0;
  position: relative;
  overflow: hidden;
}
.pv-cover::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}
.pv-cover-fallback {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  background-size: 200% 200%;
  animation: pvGradientShift 8s ease infinite;
}
@keyframes pvGradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.pv-close {
  position: absolute; top: 14px; right: 14px; z-index: 4;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; color: #fff; line-height: 1;
  background: rgba(0,0,0,0.4); border: none; cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background .15s ease, transform .15s ease;
}
.pv-close:hover { background: rgba(0,0,0,0.6); transform: scale(1.08); }
.pv-body {
  padding: 0 24px 26px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.pv-avatar {
  width: 112px; height: 112px; border-radius: 50%;
  margin-top: -56px;
  border: 5px solid var(--panel);
  overflow: hidden;
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 800; color: #fff;
  box-shadow: 0 0 0 3px var(--accent), 0 14px 30px -8px rgba(0,0,0,0.5);
  flex-shrink: 0;
  transition: transform .18s ease;
}
.pv-avatar:hover { transform: scale(1.045); }
.pv-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-nick-row {
  margin-top: 14px;
  font-size: 21px; font-weight: 800;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pv-status {
  margin-top: 6px;
  font-size: 12.5px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 4px 14px; border-radius: 999px;
  box-shadow: 0 6px 16px -6px rgba(0,0,0,0.35);
}
.pv-info-row {
  margin-top: 14px;
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
}
.pv-chip {
  font-size: 12px; font-weight: 700;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 999px;
  white-space: nowrap;
}
.pv-about-label {
  margin-top: 18px;
  width: 100%;
  text-align: left;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted);
}
.pv-about {
  margin-top: 6px;
  font-size: 13.5px; line-height: 1.6;
  color: var(--text);
  width: 100%;
  text-align: left;
  box-sizing: border-box;
}
.pv-status-available { background: linear-gradient(135deg, #2ecc71, #27ae60) !important; }
.pv-status-busy { background: linear-gradient(135deg, #e74c3c, #c0392b) !important; }
.pv-status-away { background: linear-gradient(135deg, #f39c12, #e67e22) !important; }
.pv-status-neutral { background: linear-gradient(135deg, var(--accent), var(--accent-2)) !important; }
.pv-stats {
  margin-top: 18px;
  width: 100%;
  display: flex;
  gap: 8px;
}
.pv-stat {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: var(--panel-2);
  border-radius: 14px;
  padding: 12px 6px;
  transition: transform .15s ease;
}
.pv-stat:hover { transform: translateY(-2px); }
.pv-stat-val {
  font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pv-stat-label { font-size: 10.5px; font-weight: 700; color: var(--text-muted); }
.pv-member-since {
  margin-top: 14px;
  font-size: 11.5px; font-weight: 600;
  color: var(--text-muted);
}
.pv-pm-btn {
  margin-top: 18px;
  width: 100%; height: 46px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 12px 26px -10px rgba(0,0,0,0.45);
  transition: transform .15s ease, filter .15s ease;
}
.pv-pm-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.pv-pm-btn:active { transform: translateY(0); }


/* ============ Profil v5: beğeni, rozetler, rütbe, kanallar ============ */
.pv-card { max-width: 480px; }
.pv-like-row {
  margin-top: 12px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.pv-stats-4 { gap: 8px; }
.pv-stats-4 .pv-stat {
  border-radius: 16px;
  padding: 14px 6px 12px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.pv-stats-4 .pv-stat:hover { transform: translateY(-3px); box-shadow: 0 10px 20px -10px rgba(0,0,0,0.25); }
.pv-stat-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px;
  color: #fff;
}
.pv-stat-blue { background: linear-gradient(160deg, rgba(59,130,246,0.14), rgba(59,130,246,0.03)); }
.pv-stat-blue .pv-stat-icon { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.pv-stat-blue .pv-stat-val { background: linear-gradient(135deg, #3b82f6, #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-stat-green { background: linear-gradient(160deg, rgba(16,185,129,0.14), rgba(16,185,129,0.03)); }
.pv-stat-green .pv-stat-icon { background: linear-gradient(135deg, #10b981, #34d399); }
.pv-stat-green .pv-stat-val { background: linear-gradient(135deg, #10b981, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-stat-pink { background: linear-gradient(160deg, rgba(236,72,153,0.14), rgba(236,72,153,0.03)); cursor: pointer; }
.pv-stat-pink .pv-stat-icon { background: linear-gradient(135deg, #a3a8b8, #c4c9d6); transition: background .2s ease; }
.pv-stat-pink .pv-stat-val { background: linear-gradient(135deg, #ec4899, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-stat-pink.liked .pv-stat-icon { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.pv-stat-purple { background: linear-gradient(160deg, rgba(139,92,246,0.14), rgba(139,92,246,0.03)); }
.pv-stat-purple .pv-stat-icon { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.pv-stat-purple .pv-stat-val { background: linear-gradient(135deg, #8b5cf6, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-like-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 13px; font-weight: 700;
  color: var(--text);
  transition: transform .12s ease, background .15s ease;
}
.pv-like-btn:hover { transform: scale(1.04); }
.pv-like-btn:disabled { cursor: default; opacity: .6; }
.pv-like-btn.liked { background: rgba(231,76,60,0.12); border-color: rgba(231,76,60,0.4); }
.pv-like-icon { font-size: 15px; }
.pv-view-count {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px;
}
.pv-section-label {
  margin-top: 18px;
  width: 100%;
  text-align: left;
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase;
  color: var(--text-muted);
}
.pv-badge-grid {
  margin-top: 8px;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.pv-badge {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-2);
  border-radius: 12px;
  padding: 8px 10px;
}
.pv-badge-icon {
  font-size: 18px;
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pv-badge-label { font-size: 11.5px; font-weight: 700; color: var(--text); text-align: left; }
.pv-extra-section:empty { display: none; }
.pv-rank-pill {
  margin-top: 8px;
  display: inline-block;
  font-size: 12.5px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ec4899, #6366f1);
  padding: 6px 14px; border-radius: 999px;
}
.pv-channels-wrap {
  margin-top: 8px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pv-channel-chip {
  background: var(--panel-2);
  color: var(--accent);
  font-weight: 700;
}


/* ============ Kullanıcı sağ-tık menüsü ============ */
.user-ctx-menu {
  position: fixed;
  z-index: 200;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.4);
  padding: 6px;
  min-width: 190px;
  display: flex; flex-direction: column;
}
.user-ctx-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 38px;
  border: none; background: none;
  border-radius: 9px;
  padding: 0 10px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.user-ctx-item:hover { background: var(--panel-2); }
.user-ctx-item span:first-child { font-size: 14px; width: 18px; text-align: center; flex-shrink: 0; }


/* ============ WHOIS popup modalı ============ */
.whois-modal {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,12,25,0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 160;
  align-items: center; justify-content: center;
  padding: 20px;
}
.whois-modal.open { display: flex; }
.whois-card {
  width: 100%; max-width: 380px;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: 20px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,0.5);
  position: relative;
  padding: 20px;
  box-sizing: border-box;
  animation: pvPopIn .22s cubic-bezier(.2,.9,.3,1.2);
}
.whois-close {
  position: absolute; top: 14px; right: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--text-muted); background: var(--panel-2); border: none; cursor: pointer;
}
.whois-close:hover { background: var(--border); }
.whois-title {
  font-size: 15px; font-weight: 800; color: var(--text);
  margin-bottom: 12px;
  padding-right: 30px;
}
.whois-body { display: flex; flex-direction: column; gap: 8px; }
.whois-line {
  font-size: 12.5px; font-weight: 600; color: var(--text);
  background: var(--panel-2);
  border-radius: 10px;
  padding: 8px 12px;
  line-height: 1.4;
}
.whois-loading { color: var(--text-muted); text-align: center; }


/* ============ Büyütülmüş Ayarlar/Tema ikonları ============ */
#settingsBtn {
  width: 40px; height: 40px;
}
#settingsBtn svg {
  width: 20px; height: 20px;
}

/* ============ Ayarlar: Engellediklerim listesi ============ */
.settings-blocklist {
  max-height: 180px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.settings-blocklist-empty {
  font-size: 12.5px; font-weight: 600; color: var(--text-muted);
  padding: 10px 4px;
  text-align: center;
}
.settings-blocklist-row {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel-2);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.settings-blocklist-unblock {
  border: none; background: none;
  color: var(--accent);
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.settings-blocklist-unblock:hover { background: var(--border); }


/* ============ Ayarlar: Engellediklerim butonu ============ */
.settings-blocklist-btn {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13.5px; font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.settings-blocklist-btn:hover { background: var(--border); }
.settings-blocklist-count {
  background: var(--accent);
  color: #fff;
  font-size: 11px; font-weight: 800;
  min-width: 20px; height: 20px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 6px;
}

/* ============ Ayarlar: Yazı stili grid'i ============ */
.text-style-grid {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.text-style-swatch {
  width: 46px; height: 40px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease;
}
.text-style-swatch:hover { transform: scale(1.05); }
.text-style-swatch.selected { border-color: var(--accent); background: rgba(108,92,231,0.1); }
.text-style-bold { font-weight: 800; }
.text-style-italic { font-style: italic; }
.text-style-underline { text-decoration: underline; }

/* ============ Gece/Gündüz switch ============ */
.theme-switch {
  width: 48px !important; height: 26px !important;
  padding: 0; background: none !important;
}
.theme-switch:hover { background: none !important; }
.theme-switch-track {
  width: 48px; height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #cfd3e6, #e8eaf5);
  display: block;
  position: relative;
  transition: background .25s ease;
}
.theme-switch.is-dark .theme-switch-track {
  background: linear-gradient(135deg, #2b2540, #1a1730);
}
.theme-switch-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(135deg, #ffb648, #ff7a59);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 3px 8px -2px rgba(0,0,0,0.4);
  transition: transform .25s cubic-bezier(.4,0,.2,1), background .25s ease;
}
.theme-switch.is-dark .theme-switch-thumb {
  transform: translateX(22px);
  background: linear-gradient(135deg, #8b7cf6, #6c5ce7);
}
.theme-switch-thumb svg { width: 14px; height: 14px; }

/* ============ Profili Düzenle formu ============ */
.edit-profile-card { max-width: 420px; text-align: left; }
.edit-field { margin-bottom: 14px; }
.edit-field label {
  display: block;
  font-size: 11px; font-weight: 800;
  letter-spacing: .03em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.edit-field input[type="text"], .edit-field input[type="number"], .edit-field select, .edit-field textarea {
  width: 100%; box-sizing: border-box;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  font-family: var(--font);
}
.edit-field textarea { min-height: 70px; resize: vertical; }
.edit-image-row { display: flex; gap: 8px; }
.edit-image-row input { flex: 1; }
.edit-suggest-btn {
  border: none; border-radius: 10px;
  background: var(--accent);
  color: #fff; font-size: 12.5px; font-weight: 700;
  padding: 0 14px;
  cursor: pointer;
  flex-shrink: 0;
}
.edit-suggest-btn:disabled { opacity: .6; cursor: default; }
.edit-image-current {
  font-size: 11px; color: var(--text-muted); margin-top: 6px;
}


/* ============ Profili Düzenle — sosyal medya tarzı ============ */
.ep-card {
  width: 100%; max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--panel);
  border-radius: 24px;
  box-shadow: 0 40px 90px -24px rgba(0,0,0,0.6);
  position: relative;
  margin: auto;
}
.ep-loading { padding: 50px 20px; text-align: center; color: var(--text-muted); font-weight: 700; }

.ep-cover {
  height: 150px;
  background-size: cover;
  background-position: center 50%;
  border-radius: 24px 24px 0 0;
  position: relative;
  cursor: ns-resize;
  user-select: none;
}
.ep-cover-fallback {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: default;
}
.ep-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; background: rgba(0,0,0,0.4); border: none; cursor: pointer;
}
.ep-close:hover { background: rgba(0,0,0,0.6); }
.ep-cover-edit-btn {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px;
  cursor: pointer;
}
.ep-cover-edit-btn:hover { background: rgba(0,0,0,0.65); }
.ep-cover-del-btn {
  position: absolute; bottom: 12px; right: 12px; z-index: 3;
  background: rgba(0,0,0,0.5);
  color: #fff; border: none;
  font-size: 11.5px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
  cursor: pointer;
}
.ep-cover-del-btn:hover { background: rgba(231,76,60,0.85); }

.ep-avatar-wrap {
  position: relative;
  width: 96px; height: 96px;
  margin: -48px auto 0;
}
.ep-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  border: 4px solid var(--panel);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 800; color: #fff;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.45);
}
.ep-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ep-avatar-edit-badge {
  position: absolute; bottom: 2px; right: 2px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  cursor: pointer;
  border: 2px solid var(--panel);
}
.ep-avatar-edit-badge:hover { filter: brightness(1.1); }
.ep-avatar-del-badge {
  position: absolute; top: -2px; left: -2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #e74c3c; color: #fff; border: 2px solid var(--panel);
  font-size: 13px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

.ep-nick-row {
  text-align: center;
  margin-top: 10px;
  font-size: 18px; font-weight: 800; color: var(--text);
}

.ep-form { padding: 20px 22px 4px; }
.ep-row { display: flex; gap: 12px; }
.ep-row .ep-field { flex: 1; }
.ep-field { margin-bottom: 14px; }
.ep-field-full { width: 100%; }
.ep-field label {
  display: block;
  font-size: 12px; font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.ep-req { color: #e74c3c; }
.ep-field input, .ep-field select, .ep-field textarea {
  width: 100%; box-sizing: border-box;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  font-family: var(--font);
}
.ep-field textarea { min-height: 70px; resize: vertical; }

.ep-actions {
  display: flex; gap: 10px;
  padding: 16px 22px 22px;
}
.ep-cancel-btn, .ep-save-btn {
  flex: 1; height: 46px; border: none; border-radius: 12px;
  font-size: 14px; font-weight: 800; cursor: pointer;
}
.ep-cancel-btn { background: var(--panel-2); color: var(--text); }
.ep-save-btn {
  background: linear-gradient(135deg, #ec4899, #6366f1);
  color: #fff;
  box-shadow: 0 12px 26px -10px rgba(0,0,0,0.4);
}
.ep-save-btn:hover { filter: brightness(1.06); }
.ep-save-btn:disabled { opacity: .7; cursor: default; }

/* ============ Ayarlar: gruplu kart görünümü ============ */
.settings-group { margin-bottom: 22px; }
.settings-group-title {
  font-size: 11px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 2px;
}
.settings-card {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.settings-card .settings-section { margin: 0; }
.settings-section-last { margin-bottom: 0 !important; }
.settings-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}
.settings-card.settings-toggles {
  display: flex; flex-direction: column;
  gap: 0;
}
.settings-toggle {
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
}
.settings-toggle-last { border-bottom: none; padding-bottom: 0; }
.settings-blocklist-btn { margin-bottom: 14px; }

/* ============ Profil v6: toparlanmış istatistik satırı ============ */
.pv-stats-4 { display: grid; grid-template-columns: repeat(4, 1fr); }
.pv-stat-like { cursor: pointer; transition: transform .15s ease; }
.pv-stat-like:hover { transform: translateY(-2px); }
.pv-stat-like.liked .pv-stat-val { color: #e74c3c; -webkit-text-fill-color: #e74c3c; background: none; }
.pv-like-heart {
  display: flex;
  justify-content: center;
  margin-bottom: 3px;
}
.pv-like-heart svg { width: 13px; height: 13px; }

/* ============ Bildirim zili ============ */
.notif-bell-btn { position: relative; }
.notif-bell-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 15px; height: 15px; padding: 0 3px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ff5f6d, #e63950);
  color: #fff;
  font-size: 9.5px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--panel);
}
.notif-bell-badge[hidden] { display: none !important; }
.notif-dropdown {
  display: none;
  position: fixed;
  top: 52px; left: 10px;
  z-index: 200;
  width: 300px;
  max-height: 400px;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.4);
  padding: 6px;
}
.notif-dropdown.open { display: block; }
.notif-empty {
  padding: 30px 16px;
  text-align: center;
  font-size: 12.5px; font-weight: 600;
  color: var(--text-muted);
}
.notif-row {
  width: 100%;
  display: flex; align-items: flex-start; gap: 10px;
  background: none; border: none;
  border-radius: 10px;
  padding: 10px 8px;
  cursor: pointer;
  text-align: left;
}
.notif-row:hover { background: var(--panel-2); }
.notif-row.unread { background: rgba(108,92,231,0.08); }
.notif-icon {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--panel-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}
.notif-text { flex: 1; min-width: 0; font-size: 12.5px; color: var(--text); line-height: 1.4; }
.notif-preview { color: var(--text-muted); font-size: 11.5px; display: block; white-space: normal; word-break: break-word; overflow-wrap: break-word; }
.notif-time { font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
.highlight-flash { animation: highlightFlashAnim 2s ease; }
@keyframes highlightFlashAnim {
  0%, 100% { background: transparent; }
  20%, 60% { background: rgba(108,92,231,0.18); }
}

/* ============ Etiketlenen mesaj vurgusu ============ */
.msg-bubble-mention {
  background: rgba(108,92,231,0.14) !important;
  border: 1.5px solid var(--accent);
  box-shadow: 0 2px 10px -4px rgba(108,92,231,0.35);
}

/* ============ Yanıtla / alıntıla çubuğu ============ */
.reply-preview-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: rgba(108,92,231,0.08);
  border-top: 2px solid var(--accent);
  flex-shrink: 0;
}
.reply-preview-bar[hidden] { display: none !important; }
.reply-preview-content { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; overflow: hidden; }
.reply-preview-label { font-size: 11.5px; font-weight: 700; color: var(--accent); flex-shrink: 0; display: inline-block; }
.reply-preview-nick { font-size: 12px; font-weight: 800; color: var(--text); flex-shrink: 0; display: inline-block; }
.reply-preview-text {
  font-size: 12px; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: inline-block; min-width: 0;
}
.reply-preview-close {
  width: 24px; height: 24px; border-radius: 50%;
  border: none; background: var(--panel-2); color: var(--text-muted);
  font-size: 15px; cursor: pointer; flex-shrink: 0;
}
.reply-preview-close:hover { background: var(--border); }

/* ============ Mesaj yanıtla ikonu + alıntı kutusu ============ */
.msg-bubble { position: relative; padding-right: 26px; }
.msg-reply-btn {
  position: absolute; bottom: -4px; right: -4px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--panel);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px -3px rgba(0,0,0,0.35);
  opacity: 0.85; transition: opacity .15s ease, transform .15s ease;
}
.msg-reply-btn svg { width: 13px; height: 13px; }
.msg-bubble:hover .msg-reply-btn { opacity: 1; transform: scale(1.1); }
.msg-quote-block {
  background: rgba(0,0,0,0.06);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 6px 10px;
  margin-bottom: 6px;
  cursor: pointer;
}
.msg-quote-nick { font-size: 11px; font-weight: 800; color: var(--accent); }
.msg-quote-text { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ @ etiket otomatik-tamamlama ============ */
.mention-dropdown {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 30px -14px rgba(0,0,0,0.4);
  padding: 4px;
  margin: 0 16px 6px;
  max-height: 200px;
  overflow-y: auto;
}
.mention-dropdown[hidden] { display: none; }
.mention-row {
  text-align: left;
  border: none; background: none;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px; font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.mention-row:hover, .mention-row.active { background: var(--panel-2); }

/* ============ Bildirim dropdown başlığı ============ */
.notif-dropdown-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 10px;
  font-size: 12.5px; font-weight: 800; color: var(--text);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.notif-clear-btn {
  border: none; background: none;
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  cursor: pointer;
}
.notif-clear-btn:hover { text-decoration: underline; }

/* ============ Kendi mesajlarını ayırt et ============ */
.msg-bubble-own {
  background: linear-gradient(135deg, rgba(108,92,231,0.14), rgba(162,155,254,0.10)) !important;
  border: 1px solid rgba(108,92,231,0.25);
}
.msg-own .msg-nick-pill { box-shadow: 0 0 0 2px var(--accent); }

/* ============ Ana menü (hamburger) ============ */
.main-menu-dropdown {
  position: fixed; top: 52px; left: 10px; z-index: 200;
  width: 230px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.4);
  padding: 6px;
  display: flex; flex-direction: column;
}
.main-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; height: 40px;
  border: none; background: none;
  border-radius: 10px;
  padding: 0 10px;
  font-size: 13.5px; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.main-menu-item:hover { background: var(--panel-2); }
.main-menu-item span:first-child { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.main-menu-divider { height: 1px; background: var(--border); margin: 6px 4px; }
.text-info-body { font-size: 13px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }

/* ============ Kanal listesini üstte göster tercihi ============ */
body.pref-channels-top .mobile-channel-tabs {
  display: flex !important;
}
body.pref-channels-top .channels-panel .panel-section-label:not(.pm-label) {
  display: none !important;
}
body.pref-channels-top .channels-panel #channelList {
  display: none !important;
}
body.pref-channels-top .channels-panel .panel-tabs.single {
  display: none !important;
}
body.pref-channels-top .channels-panel .join-btn {
  display: none !important;
}
body.pref-channels-top .mobile-tab-join {
  color: var(--accent);
  font-weight: 800;
}

/* ============ Özel mesaj başlığı: Profil/Engelle butonları ============ */
.ch-pm-actions { display: flex; gap: 4px; margin-right: 6px; flex-shrink: 0; }
.ch-pm-actions[hidden] { display: none !important; }
.ch-pm-action-btn {
  width: 32px; height: 32px; border-radius: 9px;
  border: none; background: var(--panel-2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0.85;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.ch-pm-action-btn:hover { transform: translateY(-1px); opacity: 1; }
#pmCallBtn { background: rgba(52,211,153,0.14); color: #10ac84; }
#pmCallBtn:hover { background: rgba(52,211,153,0.26); }
#pmProfileBtn { background: rgba(108,92,231,0.14); color: var(--accent); }
#pmProfileBtn:hover { background: rgba(108,92,231,0.26); }
#pmFavBtn { background: rgba(241,196,15,0.14); color: #d4a017; }
#pmFavBtn:hover { background: rgba(241,196,15,0.26); }
#pmBlockBtn { background: rgba(231,76,60,0.14); color: #e74c3c; }
#pmBlockBtn:hover { background: rgba(231,76,60,0.26); }
#pmBlockBtn.active { background: #e74c3c; color: #fff; opacity: 1; }
#pmFavBtn.active { background: #f1c40f; color: #fff; opacity: 1; }


/* ============ Profil istatistik kartları: renkli/ikonlu ============ */
.pv-stats-4 { gap: 8px; }
.pv-stats-4 .pv-stat {
  border-radius: 16px;
  padding: 14px 6px 12px;
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.pv-stats-4 .pv-stat:hover { transform: translateY(-3px); box-shadow: 0 10px 20px -10px rgba(0,0,0,0.25); }
.pv-stat-icon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 6px;
  color: #fff;
}
.pv-stat-blue { background: linear-gradient(160deg, rgba(59,130,246,0.14), rgba(59,130,246,0.03)); }
.pv-stat-blue .pv-stat-icon { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.pv-stat-blue .pv-stat-val { background: linear-gradient(135deg, #3b82f6, #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-stat-green { background: linear-gradient(160deg, rgba(16,185,129,0.14), rgba(16,185,129,0.03)); }
.pv-stat-green .pv-stat-icon { background: linear-gradient(135deg, #10b981, #34d399); }
.pv-stat-green .pv-stat-val { background: linear-gradient(135deg, #10b981, #34d399); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-stat-pink { background: linear-gradient(160deg, rgba(236,72,153,0.14), rgba(236,72,153,0.03)); cursor: pointer; }
.pv-stat-pink .pv-stat-icon { background: linear-gradient(135deg, #a3a8b8, #c4c9d6); transition: background .2s ease; }
.pv-stat-pink .pv-stat-val { background: linear-gradient(135deg, #ec4899, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pv-stat-pink.liked .pv-stat-icon { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.pv-stat-purple { background: linear-gradient(160deg, rgba(139,92,246,0.14), rgba(139,92,246,0.03)); }
.pv-stat-purple .pv-stat-icon { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.pv-stat-purple .pv-stat-val { background: linear-gradient(135deg, #8b5cf6, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }


/* ============ Üst şerit kanal sekmesi: kapatma X'i ============ */
.mobile-tab { display: flex; align-items: center; gap: 5px; }
.mobile-tab-x {
  width: 15px; height: 15px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; opacity: 0.6;
  flex-shrink: 0;
}
.mobile-tab-x:hover { opacity: 1; background: rgba(0,0,0,0.12); }

/* ============ Klasik görünüm (mIRC tarzı) ============ */
.classic-line {
  padding: 1px 5px;
  font-size: 12.5px; line-height: 1.5;
  color: var(--text);
  word-break: break-word;
}
.classic-time { color: var(--text-muted); font-size: 11px; }
.classic-nick { font-weight: 800; }
.classic-line-mention { background: rgba(108,92,231,0.12); border-radius: 4px; }
.classic-line-own { background: rgba(108,92,231,0.05); }


@media (max-width: 768px) {
.tb-icon {width: 25px; height: 25px;}
.topbar {padding: 0px 3px !important;}
#settingsBtn {width: 35px;height: 35px;}
#menuBtn {display: none;}
}

/* ============ VIP görünümü (admin panelinden yönetilen) ============ */
.vip-styled { position: relative; }
.vip-target-icon { display: inline-block; margin-right: 2px; }

/* Yazı animasyonları */
@keyframes vipPulseText { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.vip-anim-pulse { animation: vipPulseText 1.4s ease-in-out infinite; }
@keyframes vipShimmerText { 0% { filter: brightness(1); } 50% { filter: brightness(1.6); } 100% { filter: brightness(1); } }
.vip-anim-shimmer { animation: vipShimmerText 1.8s ease-in-out infinite; }
@keyframes vipRainbowText { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } }
.vip-anim-rainbow { animation: vipRainbowText 3s linear infinite; }
@keyframes vipGlowText { 0%,100% { text-shadow: 0 0 4px currentColor; } 50% { text-shadow: 0 0 16px currentColor, 0 0 24px currentColor; } }
.vip-anim-glow { animation: vipGlowText 1.6s ease-in-out infinite; }
@keyframes vipShakeText { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-2px); } 40% { transform: translateX(2px); } 60% { transform: translateX(-2px); } 80% { transform: translateX(2px); } }
.vip-anim-shake { animation: vipShakeText .5s ease-in-out infinite; display: inline-block; }
@keyframes vipBounceText { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.vip-anim-bounce { animation: vipBounceText .7s ease-in-out infinite; display: inline-block; }
@keyframes vipWaveText { 0%,100% { transform: translateY(0); } 25% { transform: translateY(-3px); } 75% { transform: translateY(3px); } }
.vip-anim-wave { animation: vipWaveText 1.4s ease-in-out infinite; display: inline-block; }
@keyframes vipJellyText { 0%,100% { transform: scale(1,1); } 25% { transform: scale(0.92,1.08); } 50% { transform: scale(1.06,0.94); } 75% { transform: scale(0.97,1.03); } }
.vip-anim-jelly { animation: vipJellyText 1.1s ease-in-out infinite; display: inline-block; }
@keyframes vipFlickerText { 0%,19%,21%,23%,25%,54%,56%,100% { opacity: 1; } 20%,22%,24%,55% { opacity: .35; } }
.vip-anim-flicker { animation: vipFlickerText 2.2s infinite; }
@keyframes vipFlipText { 0%,100% { transform: rotateY(0deg); } 50% { transform: rotateY(180deg); } }
.vip-anim-flip { animation: vipFlipText 2.4s ease-in-out infinite; display: inline-block; }
@keyframes vipBreatheText { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .7; transform: scale(1.04); } }
.vip-anim-typewriter { animation: vipBreatheText 2s ease-in-out infinite; display: inline-block; }
@keyframes vipNeonText { 0%,100% { text-shadow: 0 0 4px currentColor, 0 0 10px currentColor; } 50% { text-shadow: 0 0 2px currentColor; } }
.vip-anim-neon { animation: vipNeonText 1.3s ease-in-out infinite; }
@keyframes vipSlideinText { 0%,100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
.vip-anim-slidein { animation: vipSlideinText 1s ease-in-out infinite; display: inline-block; }
@keyframes vipBlurText { 0%,100% { filter: blur(0px); } 50% { filter: blur(1.5px); } }
.vip-anim-blur { animation: vipBlurText 2s ease-in-out infinite; }

/* Arkaplan animasyonları */
@keyframes vipBgShift { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } }
.vip-bg-shift { animation: vipBgShift 4s linear infinite; }
@keyframes vipBgPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.vip-bg-pulse { animation: vipBgPulse 1.2s ease-in-out infinite; display: inline-block; }
@keyframes vipBgShine {
  0% { box-shadow: inset -60px 0 30px -20px rgba(255,255,255,0.35); }
  50% { box-shadow: inset 60px 0 30px -20px rgba(255,255,255,0.35); }
  100% { box-shadow: inset -60px 0 30px -20px rgba(255,255,255,0.35); }
}
.vip-bg-shine { animation: vipBgShine 2.2s ease-in-out infinite; }
@keyframes vipBgShimmerAnim { 0% { filter: brightness(1); } 50% { filter: brightness(1.35); } 100% { filter: brightness(1); } }
.vip-bg-shimmer { animation: vipBgShimmerAnim 1.6s ease-in-out infinite; }
@keyframes vipBgRainbowAnim { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } }
.vip-bg-rainbow { animation: vipBgRainbowAnim 3s linear infinite; }
@keyframes vipBgRotateAnim { 0% { filter: hue-rotate(0deg) brightness(1); } 50% { filter: hue-rotate(180deg) brightness(1.15); } 100% { filter: hue-rotate(360deg) brightness(1); } }
.vip-bg-rotate { animation: vipBgRotateAnim 4s linear infinite; }
@keyframes vipBgBreatheAnim { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: .88; } }
.vip-bg-breathe { animation: vipBgBreatheAnim 2s ease-in-out infinite; display: inline-block; }
@keyframes vipBgFlashAnim { 0%,90%,100% { filter: brightness(1); } 95% { filter: brightness(1.8); } }
.vip-bg-flash { animation: vipBgFlashAnim 2.5s ease-in-out infinite; }
@keyframes vipBgBorderAnim { 0% { box-shadow: 0 0 0 2px rgba(255,255,255,0.5); } 50% { box-shadow: 0 0 0 2px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 2px rgba(255,255,255,0.5); } }
.vip-bg-border { animation: vipBgBorderAnim 1.6s ease-in-out infinite; }
@keyframes vipBgGlowAnim { 0%,100% { box-shadow: 0 0 10px currentColor; } 50% { box-shadow: 0 0 25px currentColor; } }
.vip-bg-glow { animation: vipBgGlowAnim 1.5s ease-in-out infinite; }

/* İkona özel animasyonlar */
@keyframes vipIconSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.vip-icon-spin { display: inline-block; animation: vipIconSpin 2s linear infinite; }
@keyframes vipIconFlip3d { 0%,100% { transform: rotateY(0deg); } 50% { transform: rotateY(180deg); } }
.vip-icon-flip3d { display: inline-block; animation: vipIconFlip3d 2s ease-in-out infinite; }


/* ============ VIP: admin panelindeki hap görünümüyle birebir eşitle ============ */
.vip-pill-shape {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,0.4);
  line-height: 1.3;
  flex: 0 1 auto !important;
  width: fit-content;
  max-width: 100%;
}
.msg-header-row .vip-pill-shape {
  padding: 3px 11px !important;
  gap: 4px;
  box-shadow: none;
}
.msg-header-row .vip-target-icon {
  font-size: 11px !important;
}
.panel-row .vip-pill-shape {
  padding: 3px 10px !important;
  gap: 4px;
  box-shadow: none;
  font-size: 12px;
}
.panel-row .vip-target-icon {
  font-size: 11px !important;
}
.vip-target-icon {
  font-size: 1em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.2em;
  height: 1.2em;
  transform-origin: center;
  will-change: transform;
}
.vip-pill-text-inner { font-weight: 700; white-space: nowrap; }

/* ============ VIP: eksik kalan arkaplan animasyonları ============ */
@keyframes vipBgShimmerAnim2 { 0% { filter: brightness(1); } 50% { filter: brightness(1.35); } 100% { filter: brightness(1); } }
.vip-bg-shimmer { animation: vipBgShimmerAnim2 1.6s ease-in-out infinite; }
@keyframes vipBgRainbowAnim2 { 0% { filter: hue-rotate(0deg); } 100% { filter: hue-rotate(360deg); } }
.vip-bg-rainbow { animation: vipBgRainbowAnim2 3s linear infinite; }
@keyframes vipBgRotateAnim { 0% { filter: hue-rotate(0deg) brightness(1); } 50% { filter: hue-rotate(180deg) brightness(1.15); } 100% { filter: hue-rotate(360deg) brightness(1); } }
.vip-bg-rotate { animation: vipBgRotateAnim 4s linear infinite; }
@keyframes vipBgBreatheAnim { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: .88; } }
.vip-bg-breathe { animation: vipBgBreatheAnim 2s ease-in-out infinite; }
@keyframes vipBgWaveAnim { 0%,50%,100% { filter: brightness(1); } 25%,75% { filter: brightness(1.18); } }
.vip-bg-wave { animation: vipBgWaveAnim 2.2s ease-in-out infinite; }
@keyframes vipBgFlashAnim { 0%,90%,100% { filter: brightness(1); } 95% { filter: brightness(1.8); } }
.vip-bg-flash { animation: vipBgFlashAnim 2.5s ease-in-out infinite; }
@keyframes vipBgBorderAnim { 0% { box-shadow: 0 0 0 2px rgba(255,255,255,0.5); } 50% { box-shadow: 0 0 0 2px rgba(255,255,255,0); } 100% { box-shadow: 0 0 0 2px rgba(255,255,255,0.5); } }
.vip-bg-border { animation: vipBgBorderAnim 1.6s ease-in-out infinite; }
@keyframes vipBgGlowAnim { 0%,100% { box-shadow: 0 0 10px currentColor; } 50% { box-shadow: 0 0 25px currentColor; } }
.vip-bg-glow { animation: vipBgGlowAnim 1.5s ease-in-out infinite; }

/* ============ Bildirim panelinde avatar + rozet ikonu ============ */
.notif-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.notif-avatar img { width: 100%; height: 100%; object-fit: cover; }
.notif-avatar-system {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-size: 15px;
}
.notif-icon-badge {
  position: relative;
  margin-left: -14px;
  margin-top: 16px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--panel);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px;
  flex-shrink: 0;
  z-index: 1;
}

/* ============ Radyo istek: geri sayım ============ */
.radio-istek-countdown {
  text-align: center;
  font-size: 32px; font-weight: 800;
  font-family: 'Courier New', monospace;
  color: var(--accent);
  background: var(--panel-2);
  border-radius: 14px;
  padding: 20px;
  letter-spacing: 2px;
}

/* ============ Nick çakışması: öneri çipleri ============ */
.nick-suggest-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 10px 0 18px;
}
.nick-suggest-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  font-size: 12.5px; font-weight: 700;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.nick-suggest-chip:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============ Giriş Kodu alanı: hidden garantisi ============ */
#loginKoduField[hidden] { display: none !important; }

/* ============ Giriş Kodu: rastgele kod gösterim kutusu ============ */
.login-kodu-goster-box {
  text-align: center;
  font-size: 28px; font-weight: 800;
  font-family: 'Courier New', monospace;
  letter-spacing: 8px;
  color: var(--accent);
  background: var(--panel-2);
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  user-select: none;
}

/* ============ Radyo istek: panel kapalı mesajı ============ */
.istek-panel-kapali-mesaj {
  text-align: center;
  padding: 30px 20px;
}
.istek-panel-kapali-icon {
  font-size: 40px;
  margin-bottom: 14px;
  opacity: 0.7;
}
.istek-panel-kapali-baslik {
  font-size: 15px; font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.istek-panel-kapali-alt {
  font-size: 12.5px;
  color: var(--text-muted);
}
/* ============ WHOIS modalı v2: temiz, ikonlu satırlar ============ */
.whois-card-v2 { max-width: 380px; padding: 22px; }
.whois-title-v2 {
  display: flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 800;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.whois-title-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.whois-body-v2 { display: flex; flex-direction: column; gap: 4px; }
.whois-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--panel-2);
}
.whois-row:last-child { border-bottom: none; }
.whois-row-icon {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--panel-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.whois-row-body { flex: 1; min-width: 0; }
.whois-row-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.whois-row-value {
  font-size: 13px; color: var(--text);
  word-break: break-word;
  line-height: 1.45;
}


/* ============ Sesli Arama: modal + animasyonlar + üst çubuk ============ */
.call-modal {
  display: none;
  position: fixed; inset: 0; z-index: 400;
  background: rgba(10,10,20,0.92);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.call-modal.open { display: flex; }
.call-modal-card {
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 40px 30px;
}
.call-avatar-ring {
  width: 120px; height: 120px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.call-avatar-ring .row-avatar,
.call-avatar-ring .call-avatar-img {
  width: 100px !important; height: 100px !important;
  font-size: 34px !important;
  border: 3px solid rgba(255,255,255,0.15);
}
.call-avatar-ring-pulse::before,
.call-avatar-ring-ring::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: callPulseRing 1.6s ease-out infinite;
}
.call-avatar-ring-ring::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  animation: callPulseRing 1.6s ease-out infinite .5s;
}
@keyframes callPulseRing {
  0% { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}
.call-modal-nick { font-size: 22px; font-weight: 800; color: #fff; }
.call-modal-status { font-size: 14px; color: rgba(255,255,255,0.6); font-weight: 600; }
.call-btn-row { display: flex; gap: 28px; margin-top: 10px; }
.call-btn {
  width: 60px; height: 60px; border-radius: 50%;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: transform .15s ease;
}
.call-btn:hover { transform: scale(1.08); }
.call-btn-end, .call-btn-reject {
  background: linear-gradient(135deg, #ff5f6d, #e63950);
  box-shadow: 0 10px 26px -8px rgba(230,57,80,0.6);
}
.call-btn-accept {
  background: linear-gradient(135deg, #34d399, #10ac84);
  box-shadow: 0 10px 26px -8px rgba(16,172,132,0.6);
}
.call-btn-end svg { transform: rotate(135deg); }

/* Görüşme sırasında üstte sabit çubuk */
#inCallBar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 350;
  display: flex; justify-content: center;
  padding: 10px;
  pointer-events: none;
}
.incall-bar-inner {
  pointer-events: auto;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, #171a24, #12141c);
  border-radius: 999px;
  padding: 8px 10px 8px 16px;
  box-shadow: 0 14px 34px -14px rgba(0,0,0,0.6);
}
.incall-bar-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
  animation: callPulseRing2 1.3s ease-in-out infinite;
}
@keyframes callPulseRing2 { 0%,100% { opacity: 1; } 50% { opacity: .3; } }
.incall-bar-nick { font-size: 13px; font-weight: 800; color: #fff; }
.incall-bar-time { font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,0.55); font-family: 'Courier New', monospace; }
.incall-bar-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: none; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); color: #fff;
}
.incall-bar-btn-end { background: linear-gradient(135deg, #ff5f6d, #e63950); }

/* ============ Görüntülü Görüşme: video kutusu ============ */
#callVideoBox {
  position: fixed; z-index: 380;
  bottom: 80px; right: 16px;
  width: 200px; aspect-ratio: 3/4;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0a14;
  box-shadow: 0 20px 50px -18px rgba(0,0,0,0.6);
}
#callVideoBox[hidden] { display: none !important; }
#callRemoteVideo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
#callLocalVideo {
  position: absolute; bottom: 8px; right: 8px;
  width: 60px; aspect-ratio: 3/4;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.4);
  transform: scaleX(-1);
}
@media (max-width: 600px) {
  #callVideoBox { width: 140px; bottom: 76px; right: 10px; }
  #callLocalVideo { width: 44px; }
}

/* ============ Görüntülü Görüşme: tam ekran ============ */
#callVideoFullscreenBtn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 28px; height: 28px; border-radius: 8px;
  border: none; background: rgba(0,0,0,0.5); color: #fff;
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
#callVideoBox.call-video-fullscreen {
  position: fixed; inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  aspect-ratio: unset !important;
  border-radius: 0 !important;
  bottom: auto !important; right: auto !important;
  z-index: 500;
  overflow: hidden;
}
#inCallBar {
  z-index: 550;
}
#inCallBar .incall-bar-inner {
  background: rgba(23,26,36,0.85);
  backdrop-filter: blur(6px);
}
#callVideoBox.call-video-fullscreen #callRemoteVideo {
  width: 100%; height: 100%;
}
#callVideoBox.call-video-fullscreen #callLocalVideo {
  width: 110px;
  bottom: max(20px, env(safe-area-inset-bottom, 20px));
  right: max(20px, env(safe-area-inset-right, 20px));
  position: absolute;
}

/* ============ Görüntülü Görüşme: tam ekran kapatma butonu ============ */
#callVideoEndBtn {
  position: fixed;
  bottom: max(28px, env(safe-area-inset-bottom, 28px));
  left: 50%; transform: translateX(-50%);
  z-index: 550;
  width: 56px; height: 56px; border-radius: 50%;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, #ff5f6d, #e63950);
  box-shadow: 0 14px 34px -10px rgba(230,57,80,0.65);
}
#callVideoEndBtn[hidden] { display: none !important; }
#callVideoEndBtn svg { transform: rotate(135deg); }

/* ============ Emoji Paneli ============ */
.emoji-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px 16px 0 0;
  padding: 12px;
  max-height: 260px;
  display: flex; flex-direction: column;
  box-shadow: 0 -10px 30px -14px rgba(0,0,0,0.25);
}
.emoji-panel-tabs {
  display: flex; gap: 6px; overflow-x: auto;
  padding-bottom: 10px; margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.emoji-panel-tab {
  white-space: nowrap;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text-muted);
  font-size: 11.5px; font-weight: 700;
  cursor: pointer;
}
.emoji-panel-tab.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.emoji-panel-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 4px;
  overflow-y: auto;
}
.emoji-panel-item {
  border: none; background: none; cursor: pointer;
  font-size: 22px;
  padding: 6px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.emoji-panel-item:hover { background: var(--panel-2); }


/* ============ Emoji Paneli: başlık çubuğu + kapatma butonu ============ */
.emoji-panel-header {
  display: flex; justify-content: flex-end;
  margin-bottom: 6px;
  flex-shrink: 0;
}
.emoji-panel-close {
  width: 26px; height: 26px; border-radius: 50%;
  border: none; background: var(--panel-2); color: var(--text-muted);
  font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.emoji-panel-close:hover { background: var(--border); color: var(--text); }

/* ============ PM başlığı: sayı yerine profil resmi ============ */
.ch-pm-avatar { display: inline-flex; flex-shrink: 0; }
.ch-pm-avatar[hidden] { display: none !important; }
#chCount[hidden] { display: none !important; }
.ch-pm-avatar-img {
  width: 26px !important; height: 26px !important;
  font-size: 11px !important;
  border-radius: 50%;
}

/* ============ Klasik Görünüm: kullanıcı listesini sadeleştir ============ */
body.pref-classic-userlist .panel-row .row-avatar {
  display: none;
}
body.pref-classic-userlist .panel-row {
  padding: 4px 8px;
  gap: 6px;
  height: auto;
  min-height: 26px;
  display: flex;
  align-items: center;
}
body.pref-classic-userlist .panel-row .row-name {
  font-size: 12px;
  font-weight: 600;
}
body.pref-classic-userlist .panel-list {
  gap: 2px;
}
body.pref-classic-userlist .vip-nick-wrap.vip-styled {
  background: none !important;
  animation: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: inline !important;
}
body.pref-classic-userlist .vip-nick-wrap.vip-styled .vip-target-text {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  color: inherit !important;
  animation: none !important;
  font-weight: 600 !important;
  font-style: normal !important;
  text-decoration: none !important;
}
body.pref-classic-userlist .vip-nick-wrap.vip-styled .vip-target-icon {
  display: none !important;
}
body.pref-classic-userlist .rank-badge {
  width: 16px; height: 16px;
  font-size: 10px;
  border-radius: 4px;
}

/* ============ Kanallar listesi: içeriği kadar büyüsün, boşluk bırakmasın ============ */
#channelList {
  flex: 0 1 auto !important;
}

/* ============ Kanalları Üste Al: masaüstü buton, mobilde eski switch gizli ============ */
.tb-icon-desktop-only { display: none; }
@media (min-width: 980px) {
  .tb-icon-desktop-only { display: inline-flex; }
}
@media (max-width: 979px) {
  #channelsTopSettingsRow { display: none; }
}

/* ============ Site Logosu: mesaj alanı sağ üst köşe ============ */
.stream-inner-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.stream-inner-wrap .stream {
  flex: 1;
}
.site-logo-corner {
  position: absolute;
  top: 10px;
  right: 14px;
  max-height: 32px;
  max-width: 110px;
  object-fit: contain;
  opacity: 0.9;
  pointer-events: none;
  z-index: 5;
}

/* ============ Giriş Ekranı: SEO/UI yeniden tasarımı ============ */
.entry {
  position: relative;
  width: 100%;
  max-width: none;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px;
  overflow: hidden;
  background: var(--bg);
}
html, body { margin: 0; padding: 0; overflow-x: hidden; max-width: 100%; }
.entry, .entry-card, .entry-mark { max-width: 100%; box-sizing: border-box; }
.entry::before, .entry::after {
  content: '';
  position: fixed;
  width: 420px; height: 420px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.28;
  z-index: 0;
  animation: entryBlobDrift 18s ease-in-out infinite alternate;
  pointer-events: none;
}
.entry::before {
  top: -140px; left: -140px;
  background: radial-gradient(circle, var(--accent), transparent 72%);
}
.entry::after {
  bottom: -160px; right: -140px;
  background: radial-gradient(circle, var(--accent-2), transparent 72%);
  animation-delay: -9s;
}
@keyframes entryBlobDrift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.15); }
}
.entry-theme-btn {
  position: absolute; top: 20px; right: 20px; z-index: 2;
  width: 42px; height: 42px; border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,0.3);
}
.entry-theme-btn svg { width: 20px; height: 20px; }
.entry-mark { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; margin-bottom: 30px; text-align: center; }
.mark-bubble {
  width: 76px; height: 76px; border-radius: 24px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 22px 46px -14px rgba(108,92,231,0.6);
  margin-bottom: 18px;
}
.mark-bubble svg { width: 38px; height: 38px; }
.entry-mark h1 {
  font-size: 32px; font-weight: 800; margin: 0;
  letter-spacing: -0.015em;
  background: linear-gradient(135deg, var(--text), var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.entry-tagline { font-size: 14.5px; color: var(--text-muted); margin-top: 8px; max-width: 320px; }
.entry-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 32px 28px;
  box-shadow: 0 44px 90px -30px rgba(0,0,0,0.35);
}
.entry-foot { position: relative; z-index: 1; font-size: 12.5px; color: var(--text-muted); text-align: center; margin-top: 18px; }
.entry-footer {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px; justify-content: center; flex-wrap: wrap;
  font-size: 11.5px; color: var(--text-muted);
  margin-top: 36px;
}
.entry-footer strong { color: var(--text); font-weight: 700; }
.entry-footer-dot { opacity: 0.5; }

/* ============ Şifre alanı: göster/gizle + CapsLock uyarısı ============ */
.field-pass-wrap { position: relative; }
.field-pass-wrap input { padding-right: 44px; }
.field-pass-toggle {
  position: absolute;
  right: 12px; top: 38px;
  width: 26px; height: 26px;
  border: none; background: none;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.field-pass-toggle svg { width: 19px; height: 19px; }
.field-pass-toggle:hover { color: var(--text); }
.capslock-warning {
  margin: 6px 0 0;
  font-size: 12px; font-weight: 600;
  color: #f0932b;
}
.capslock-warning[hidden] { display: none !important; }

/* ============ Yasal metin modalleri: biçimlendirme ============ */
.text-info-card { max-width: 480px; max-height: 80vh; overflow-y: auto; }
.text-info-body { font-size: 13.5px; line-height: 1.65; color: var(--text); }
.text-info-body p { margin: 0 0 14px; }
.text-info-body p:last-child { margin-bottom: 0; }
.text-info-body strong { color: var(--accent); }

/* ============ Kullanım Kılavuzu: kartlı, görsel modal ============ */
.guide-card { max-width: 560px; max-height: 82vh; overflow-y: auto; }
.guide-category { margin-bottom: 22px; }
.guide-category:last-child { margin-bottom: 0; }
.guide-category-baslik {
  font-size: 14px; font-weight: 800;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.guide-category-oncelik {
  background: linear-gradient(160deg, rgba(108,92,231,0.1), rgba(236,72,153,0.06));
  border: 1px solid rgba(108,92,231,0.25);
  border-radius: 16px;
  padding: 16px 16px 6px;
  margin-bottom: 26px;
}
.guide-category-oncelik .guide-category-baslik {
  border-bottom: none;
  font-size: 15.5px;
  color: var(--accent);
}
.guide-item-grid { display: grid; grid-template-columns: 1fr; gap: 4px; }
@media (min-width: 480px) {
  .guide-category-oncelik .guide-item-grid { grid-template-columns: 1fr 1fr; }
}
.guide-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 9px 6px;
  border-radius: 10px;
}
.guide-item:hover { background: var(--panel-2); }
.guide-item-icon {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--panel-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.guide-category-oncelik .guide-item-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.guide-item-ad { font-size: 12.5px; font-weight: 700; color: var(--text); }
.guide-item-aciklama { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.4; }