/* ==================== RESET & MODERN DESIGN SYSTEM ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0e1017;
  --bg-secondary: #131620;
  --bg-tertiary: #08090d;
  --bg-quaternary: #181b26;
  --bg-card: #161924;
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-active: rgba(255, 255, 255, 0.09);
  --bg-modifier: rgba(255, 255, 255, 0.04);
  --bg-modifier-hover: #1c202e;
  --bg-modifier-selected: #252a3d;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-link: #38bdf8;

  --accent-primary: #5865f2;
  --accent-hover: #4752c4;
  --accent-active: #3c45a5;
  --brand-color: #5865f2;
  --brand-gradient: linear-gradient(135deg, #5865f2 0%, #7c3aed 100%);
  --brand-glow: 0 0 24px rgba(88, 101, 242, 0.35);

  --status-online: #22c55e;
  --status-idle: #f59e0b;
  --status-dnd: #ef4444;
  --status-offline: #64748b;

  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;

  --border-color: rgba(255, 255, 255, 0.07);
  --border-glass: rgba(255, 255, 255, 0.09);
  --glass-bg: rgba(14, 16, 23, 0.82);

  --server-width: 72px;
  --sidebar-width: 240px;
  --members-width: 240px;

  --border-radius: 10px;
  --border-radius-small: 6px;
  --border-radius-lg: 16px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-large: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-elevation: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-header: 0 1px 0 rgba(0, 0, 0, 0.4), 0 2px 12px rgba(0, 0, 0, 0.2);
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.5;
}

/* ==================== SCROLLBAR GLOBAL ==================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.16);
  background-clip: padding-box;
}
::-webkit-scrollbar-corner {
  background: transparent;
}

/* ==================== LAYOUT ==================== */
#app {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* ==================== SERVER BAR ==================== */
#servers {
  width: var(--server-width);
  background: var(--bg-tertiary);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
  overflow-y: auto;
  flex-shrink: 0;
}

#servers::-webkit-scrollbar {
  width: 0;
}

.server-icon {
  width: 48px;
  height: 48px;
  background: var(--bg-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-radius 0.25s cubic-bezier(0.2, 0, 0, 1),
              background-color 0.15s cubic-bezier(0.2, 0, 0, 1),
              color 0.15s ease,
              box-shadow 0.15s ease;
  font-size: 18px;
  font-weight: 600;
  position: relative;
  color: var(--text-primary);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.server-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.server-icon:hover {
  border-radius: 16px;
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(88,101,242,0.3);
}

.server-icon.active {
  border-radius: 16px;
  background: var(--accent-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(88,101,242,0.3);
}

.server-icon.active::before {
  content: '';
  position: absolute;
  left: -12px;
  width: 4px;
  height: 36px;
  background: var(--text-primary);
  border-radius: 0 4px 4px 0;
  transition: height 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.server-icon:hover:not(.active)::before {
  content: '';
  position: absolute;
  left: -12px;
  width: 4px;
  height: 20px;
  background: var(--text-primary);
  border-radius: 0 4px 4px 0;
}

.server-icon.home {
  background: transparent;
  font-size: 24px;
  box-shadow: none;
}

.server-icon.add {
  background: transparent;
  border: 2px dashed rgba(255,255,255,0.12);
  color: var(--success);
  font-size: 32px;
  font-weight: 300;
  box-shadow: none;
}

.server-icon.add:hover {
  border-color: var(--success);
  background: var(--success);
  color: white;
  box-shadow: 0 4px 12px rgba(35,165,90,0.3);
}

.server-divider {
  width: 32px;
  height: 2px;
  background: rgba(255,255,255,0.06);
  border-radius: 1px;
  margin: 2px 0;
}

/* ==================== SIDEBAR ==================== */
#sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* Sunucu banner */
.server-banner-area {
  position: relative;
  width: 100%;
  overflow: hidden;
  flex-shrink: 0;
}
.server-banner-area.hidden {
  display: none;
}
.server-banner-img {
  width: 100%;
  height: 105px;
  object-fit: cover;
  display: block;
}

.sidebar-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  box-shadow: var(--shadow-header);
  z-index: 1;
  cursor: default;
  letter-spacing: -0.01em;
}

#sidebar-title {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.content-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 8px 8px;
}

.content-list::-webkit-scrollbar {
  width: 4px;
}

.content-list::-webkit-scrollbar-track {
  background: transparent;
}

.content-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.06);
  border-radius: 2px;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 8px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dm-item,
.channel-item {
  padding: 7px 10px;
  margin: 2px 6px;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.2, 0, 0, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 20px;
  position: relative;
}

.dm-item {
  padding: 8px 10px;
  margin: 2px 6px;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.2, 0, 0, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.dm-item:hover,
.channel-item:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
  transform: translateX(2px);
}

.dm-item.active,
.channel-item.active {
  background: var(--bg-active);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand-color);
}

/* DM Item Info */
.dm-item-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.dm-item-name {
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dm-item-custom-status {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  max-width: 140px;
}

.dm-item-custom-status:empty {
  display: none;
}

/* Member Custom Status */
.member-custom-status {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-custom-status:empty {
  display: none;
}

.user-avatar-container {
  position: relative;
  width: 32px;
  height: 32px;
}

.avatar-small {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.channel-icon {
  color: var(--text-muted);
  font-size: 20px;
}

.friend-request-item {
  padding: 8px;
  margin: 2px 0;
  border-radius: var(--border-radius-small);
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.friend-request-item span {
  flex: 1;
  color: var(--text-primary);
  font-size: 14px;
}

/* ==================== USER PANEL ==================== */
.user-panel {
  height: 52px;
  background: var(--bg-quaternary);
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.user-info {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

#user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.custom-status {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  bottom: -1px;
  right: -1px;
  border: 3px solid var(--bg-quaternary);
}

.status-dot.online { background: var(--status-online); }
.status-dot.idle { background: var(--status-idle); }
.status-dot.dnd { background: var(--status-dnd); }
.status-dot.offline { background: var(--status-offline); }

/* ==================== MAIN CHAT ==================== */
#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  position: relative;
  min-width: 0;
}

#chat-header {
  height: 52px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-header);
  z-index: 10;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

#chat-icon {
  font-size: 24px;
  color: var(--text-muted);
}

#chat-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.topic {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ==================== CALL NOTIFICATIONS ==================== */
.call-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.call-info {
  flex: 1;
  color: white;
}

#caller-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

#call-type-text {
  font-size: 14px;
  opacity: 0.9;
}

.call-actions {
  display: flex;
  gap: 8px;
}

.call-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

#call-timer {
  font-weight: 600;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

#remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#local-video {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 240px;
  height: 180px;
  border-radius: var(--border-radius);
  object-fit: cover;
  box-shadow: var(--shadow-large);
  border: 2px solid rgba(255,255,255,0.1);
}

/* ==================== MESSAGES ==================== */
#messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 4px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#messages::-webkit-scrollbar {
  width: 8px;
}

#messages::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}

#messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.message {
  display: block;
  padding: 4px 16px;
  margin-top: 4px;
  position: relative;
  height: auto;
  min-height: fit-content;
  transition: background 0.06s ease;
}

.message:hover {
  background: rgba(0,0,0,0.08);
}

.message-content-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  height: auto;
  width: 100%;
}

.message .msg-avatar {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

.message .msg-avatar:hover { opacity: 0.8; }

.message-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.message-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.message-author {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.375;
  cursor: pointer;
}

.message-author:hover { text-decoration: underline; }

.message-author.own { color: var(--accent-primary); }

.message-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.message-edited {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
}

.message-content {
  font-size: 15px;
  line-height: 1.375;
  color: var(--text-secondary);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.file-preview {
  display: block;
  margin-top: 6px;
  position: relative;
  max-width: 420px;
}

.preview-image {
  display: block;
  width: 100%;
  max-width: 420px;
  max-height: 350px;
  border-radius: var(--border-radius);
  cursor: pointer;
  object-fit: contain;
}

.message-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-link);
  text-decoration: none;
  margin-top: 6px;
  transition: background 0.12s ease;
}

.message-file:hover { background: var(--bg-hover); }

.message-reactions {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.reaction {
  padding: 4px 8px;
  background: var(--bg-secondary);
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.reaction:hover { background: var(--bg-hover); }

.message-actions {
  position: absolute;
  top: -12px;
  right: 12px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-small);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.06);
  opacity: 0;
  transition: opacity 0.12s ease;
}

.message:hover .message-actions { opacity: 1; }

/* ==================== TYPING INDICATOR ==================== */
#typing-indicator {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  height: 32px;
  display: none;
}

/* ==================== SCROLL BUTTON ==================== */
.scroll-bottom {
  position: absolute;
  bottom: 80px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(88,101,242,0.4), 0 2px 6px rgba(0,0,0,0.3);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.15s ease;
}

.scroll-bottom:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(88,101,242,0.5), 0 3px 8px rgba(0,0,0,0.3);
}

#unread-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
}

/* ==================== CHAT INPUT ==================== */
#chat-input {
  padding: 0 16px 24px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}

.chat-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-quaternary);
  border-radius: var(--border-radius);
  padding: 0 8px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.04);
  transition: border-color 0.15s ease;
}

.chat-input-wrapper:focus-within {
  background: var(--bg-quaternary);
  border-color: rgba(255,255,255,0.08);
}

.chat-input-btns-left,
.chat-input-btns-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 2px;
}

.chat-input-btns-left .icon-btn,
.chat-input-btns-right .icon-btn {
  font-size: 18px;
  padding: 6px;
  min-height: auto;
  min-width: auto;
  color: var(--text-muted);
  transition: color 0.12s ease;
}

.chat-input-btns-left .icon-btn:hover,
.chat-input-btns-right .icon-btn:hover {
  color: var(--text-secondary);
}

.chat-input-center {
  position: relative;
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  align-items: center;
}

#message-input {
  width: 100% !important;
  flex: 1;
  padding: 11px 8px;
  background: transparent !important;
  border: none;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  min-width: 0;
  box-sizing: border-box;
  font-family: inherit;
  line-height: 1.375;
}

#message-input::placeholder {
  color: var(--text-muted);
}

#message-input:-webkit-autofill,
#message-input:-webkit-autofill:hover, 
#message-input:-webkit-autofill:focus, 
#message-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-quaternary, #1e1f29) inset !important;
  -webkit-text-fill-color: var(--text-primary, #ffffff) !important;
  caret-color: var(--text-primary, #ffffff) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.send-btn {
  padding: 10px 20px;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.1s cubic-bezier(0.2, 0, 0, 1);
  letter-spacing: -0.01em;
}

.send-btn:hover {
  background: var(--accent-hover);
}

.send-btn:active {
  background: var(--accent-active);
  transform: scale(0.96);
}

/* ==================== BUTTONS ==================== */
.icon-btn,
.icon-btn-tiny,
.icon-btn-small {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 20px;
  padding: 6px;
  border-radius: var(--border-radius-small);
  transition: color 0.12s ease, background 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover,
.icon-btn-tiny:hover,
.icon-btn-small:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.icon-btn-tiny {
  font-size: 16px;
  padding: 4px;
}

.icon-btn-small {
  font-size: 14px;
  padding: 4px 8px;
  width: 32px;
  height: 32px;
  background: var(--bg-hover);
  border-radius: 6px;
  transition: all 0.15s ease;
}

.icon-btn-small:hover {
  background: var(--bg-active);
}

.icon-btn-small.danger {
  background: var(--danger);
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger {
  padding: 2px 16px;
  height: 38px;
  min-width: 96px;
  border: none;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s cubic-bezier(0.2, 0, 0, 1),
              color 0.15s ease,
              transform 0.1s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #1a8d48;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-danger:hover {
  background: #d83638;
}

.btn-small {
  padding: 2px 12px;
  height: 32px;
  min-width: 60px;
  font-size: 13px;
}

/* ==================== MEMBERS PANEL ==================== */
.members-panel {
  width: var(--members-width);
  background: var(--bg-secondary);
  border-left: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
}

.panel-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-header);
}

#members-online,
#members-offline {
  padding: 16px 8px;
}

.member-category {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.member-item {
  padding: 8px;
  margin: 1px 0;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  transition: background 0.1s cubic-bezier(0.2, 0, 0, 1);
  display: flex;
  align-items: center;
  gap: 12px;
}

.member-item:hover {
  background: var(--bg-hover);
}

.member-item.speaking {
  background: rgba(34, 197, 94, 0.12) !important;
}

.member-item.speaking .member-avatar-wrap img {
  border: 2px solid #22c55e !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75) !important;
  animation: speakingGlow 1.4s infinite !important;
  border-radius: 50%;
}

/* ==================== MODALS ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  animation: overlayFadeIn 0.15s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 301;
  animation: modalSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translate(-50%, -48%) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-lg);
  width: 440px;
  max-width: 90vw;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04),
              0 8px 16px rgba(0,0,0,0.24),
              0 16px 32px rgba(0,0,0,0.2);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: var(--border-radius-small);
  transition: color 0.12s ease, background 0.12s ease;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.modal-body {
  padding: 16px 20px;
}

.modal-body label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  margin-top: 16px;
}

.modal-body label:first-child {
  margin-top: 0;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: 3px;
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: box-shadow 0.15s ease;
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  box-shadow: 0 0 0 2px var(--accent-primary);
}

.modal-body textarea {
  resize: vertical;
  min-height: 80px;
}

.hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.4;
}

.modal-footer {
  padding: 16px 20px;
  background: var(--bg-quaternary);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ==================== EMOJI PICKER ==================== */
.emoji-picker {
  position: fixed;
  bottom: 80px;
  left: 80px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius);
  padding: 12px;
  box-shadow: var(--shadow-large);
  border: 1px solid rgba(255,255,255,0.06);
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  width: 320px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
}

.emoji-item {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  border-radius: var(--border-radius-small);
  transition: background 0.1s ease, transform 0.1s ease;
}

.emoji-item:hover {
  background: var(--bg-hover);
  transform: scale(1.1);
}

/* ==================== DROPDOWN MENUS ==================== */
.dropdown-menu {
  position: fixed;
  background: #111214;
  border-radius: var(--border-radius);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04),
              0 8px 24px rgba(0,0,0,0.5),
              0 2px 6px rgba(0,0,0,0.3);
  min-width: 200px;
  padding: 6px;
  z-index: 50;
  animation: dropdownIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownIn {
  from { opacity: 0; transform: scale(0.95) translateY(-4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.menu-section {
  padding: 2px 0;
}

.menu-item {
  padding: 6px 10px;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  transition: background 0.08s ease, color 0.08s ease;
}

.menu-item:hover {
  background: var(--accent-primary);
  color: white;
}

.menu-item.danger {
  color: var(--danger);
}

.menu-item.danger:hover {
  background: var(--danger);
  color: white;
}

.menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 6px;
}

/* ==================== NOTIFICATIONS ==================== */
#notifications {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10001;
  pointer-events: none;
}

.notification {
  background: var(--bg-primary);
  padding: 12px 16px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35),
              0 1px 3px rgba(0,0,0,0.2),
              0 0 0 1px rgba(255,255,255,0.06);
  min-width: 280px;
  max-width: 400px;
  color: var(--text-primary);
  font-size: 14px;
  transform: translateX(420px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  line-height: 1.4;
}

.notification.show {
  transform: translateX(0);
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
  display: none !important;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  :root {
    --server-width: 56px;
    --sidebar-width: 200px;
  }

  #servers {
    width: var(--server-width);
  }

  .server-icon {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  #sidebar {
    width: var(--sidebar-width);
  }

  .members-panel {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 20;
  }

  .modal-content {
    width: 90vw;
  }

  #local-video {
    width: 120px;
    height: 90px;
  }
}

@media (max-width: 480px) {
  #servers {
    display: flex;
  }

  :root {
    --sidebar-width: 100%;
  }

  #main {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
  }

  #sidebar.hidden-mobile {
    transform: translateX(-100%);
  }
}

/* ==================== CALL PANEL ==================== */
.call-panel {
  position: relative;
  width: 100%;
  height: 35%;
  min-height: 300px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  z-index: 25;
  transition: height 0.3s cubic-bezier(0.2, 0, 0, 1),
              transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.call-panel.minimized {
  height: 60px;
  min-height: 60px;
}

.call-panel.maximized {
  height: 70%;
}

/* Call Header */
.call-panel-header {
  height: 48px;
  padding: 0 16px;
  background: var(--bg-quaternary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}

.call-status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.status-dot.pulsing {
  animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

#call-duration {
  font-size: 14px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.call-header-actions {
  display: flex;
  gap: 8px;
}

/* Video Grid */
.call-video-grid {
  flex: 1;
  display: flex;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
}

/* Main Video Container */
.main-video-container {
  flex: 1;
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}

/* ==================== EKRAN PAYLAŞIMI ==================== */
.screen-share-container {
  width: 100%;
  height: 480px;
  max-height: 50vh;
  display: flex;
  flex-direction: column;
  background: #0d0d12;
  position: relative;
  z-index: 10;
  overflow: hidden;
  animation: ssReveal 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 0;
  flex-shrink: 1;
}

@keyframes ssReveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.ss-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 36px;
  padding: 0 12px;
  background: #18181f;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}

.ss-topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.ss-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ed4245;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(237,66,69,0.6);
  animation: ssLivePulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ssLivePulse {
  0%, 100% { box-shadow: 0 0 4px rgba(237,66,69,0.5); }
  50% { box-shadow: 0 0 10px rgba(237,66,69,0.9); }
}

.ss-monitor-icon { color: #72767d; flex-shrink: 0; }

.ss-topbar-text {
  font-size: 12px;
  color: #96989d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-topbar-text strong { color: #dcddde; font-weight: 600; }

.ss-topbar-right { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }

.ss-topbar-right button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #b5bac1;
  cursor: pointer;
  transition: background 0.1s ease, color 0.1s ease;
}

.ss-topbar-right button:hover { background: rgba(255,255,255,0.08); color: #fff; }

.ss-close-btn:hover { background: rgba(237,66,69,0.2) !important; color: #ed4245 !important; }

.ss-stage {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ss-stage video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #000;
}
.ss-stage video.cover, .ss-slot-stage video.cover {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.ss-waiting {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0d0d12 70%);
  pointer-events: none;
  z-index: 2;
}

.ss-waiting-anim { position: relative; display: flex; align-items: center; justify-content: center; }

.ss-pulse-ring {
  position: absolute;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(88,101,242,0.3);
  animation: ssPulseRing 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ssPulseRing {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.ss-waiting-text { font-size: 13px; color: rgba(255,255,255,0.35); font-weight: 500; letter-spacing: 0.3px; }

.ss-hover-controls {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 16px;
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
  z-index: 3;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 40%);
}

.ss-stage:hover .ss-hover-controls { opacity: 1; pointer-events: all; }

.ss-hover-bar {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: rgba(0,0,0,0.75);
  border-radius: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
}

.ss-volume-control {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  padding: 0 4px;
  transition: background 0.12s ease;
}
.ss-volume-control:hover {
  background: rgba(255, 255, 255, 0.08);
}
.ss-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  cursor: pointer;
  transition: background 0.15s ease;
}
.ss-volume-slider:hover {
  background: rgba(255, 255, 255, 0.35);
}
.ss-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5865f2;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.ss-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}
.ss-volume-slider::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: #5865f2;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.ss-volume-slider::-moz-range-thumb:hover {
  transform: scale(1.3);
}

.ss-hover-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  color: #dcddde;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}

.ss-hover-btn:hover { background: rgba(255,255,255,0.16); color: #fff; }
.ss-hover-btn svg { flex-shrink: 0; }
.ss-hover-btn-danger:hover { background: rgba(237,66,69,0.3); color: #ed4245; }

.remote-video-view video { width: 100%; height: 100%; object-fit: contain; }

.video-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  opacity: 0;
  transition: opacity 0.2s cubic-bezier(0.2, 0, 0, 1);
  pointer-events: none;
}

.main-video-container:hover .video-overlay { opacity: 1; pointer-events: all; }

.video-overlay-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 100%);
}

.video-overlay-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  display: flex;
  gap: 8px;
  justify-content: center;
}

.video-placeholder {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
}

.avatar-large-container { text-align: center; }

.avatar-large {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.user-info-overlay { display: flex; flex-direction: column; gap: 4px; }
.user-info-overlay span:first-child { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.user-info-overlay span:last-child { font-size: 14px; color: var(--text-muted); }

.audio-indicators { position: absolute; bottom: 12px; left: 12px; display: flex; gap: 8px; }

.audio-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.7);
  border-radius: 6px;
  font-size: 12px;
  color: white;
  backdrop-filter: blur(8px);
}

.audio-bars { display: flex; gap: 2px; align-items: flex-end; height: 16px; }

.audio-bars .bar {
  width: 3px;
  background: var(--status-online);
  border-radius: 2px;
  animation: audio-bar 0.8s ease-in-out infinite;
}

.audio-bars .bar:nth-child(2) { animation-delay: 0.1s; }
.audio-bars .bar:nth-child(3) { animation-delay: 0.2s; }

@keyframes audio-bar {
  0%, 100% { height: 4px; }
  50% { height: 14px; }
}

.call-sidebar {
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex-shrink: 0;
}

.call-sidebar::-webkit-scrollbar { width: 4px; }

.participant-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease;
}

.participant-video:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(88,101,242,0.3); }
.participant-video.local { border: 2px solid var(--accent-primary); }
.participant-video.screen-share { border: 2px solid #f59e0b; }
.participant-video.screen-share video {
  object-fit: contain !important;
  background: #000;
}
.participant-video video { width: 100%; height: 100%; object-fit: cover; }

.participant-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 8px;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.participant-video:hover .participant-overlay { opacity: 1; }
.participant-name { font-size: 12px; font-weight: 600; color: white; }
.participant-controls { display: flex; gap: 4px; }

.participant-btn {
  width: 24px; height: 24px;
  background: rgba(0,0,0,0.6);
  border: none; border-radius: 4px;
  font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}

.participant-btn:hover { background: rgba(0,0,0,0.8); }
.participant-btn.danger { background: var(--danger); }
.participant-btn.danger:hover { background: #c03537; }

.voice-indicator {
  position: absolute;
  bottom: 4px; left: 4px; right: 4px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.participant-video.speaking .voice-indicator { opacity: 1; }

.voice-bar { height: 100%; background: var(--status-online); width: 0; transition: width 0.1s ease; }

.call-controls-bar {
  height: 64px;
  padding: 12px 16px;
  background: var(--bg-quaternary);
  border-top: 1px solid rgba(255,255,255,0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.controls-section { display: flex; gap: 8px; }

.control-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--bg-hover);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.2s cubic-bezier(0.2, 0, 0, 1);
  min-width: 80px;
}

.control-btn:hover { background: var(--bg-active); transform: translateY(-2px); }
.control-btn.active { background: var(--accent-primary); color: white; }
.control-btn.danger { background: var(--danger); color: white; }
.control-btn.danger:hover { background: #c03537; }
.control-icon { font-size: 20px; }
.control-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.connection-quality {
  position: absolute;
  top: 60px; right: 16px;
  padding: 8px 12px;
  background: rgba(0,0,0,0.7);
  border-radius: 8px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quality-indicator { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.quality-icon { font-size: 16px; }
.quality-text.excellent { color: #3ba55d; }
.quality-text.good { color: #5865f2; }
.quality-text.medium { color: #faa61a; }
.quality-text.poor { color: #ed4245; }
.quality-stats { display: flex; gap: 8px; font-size: 11px; color: var(--text-muted); }

.minimized-call {
  position: fixed;
  bottom: 20px; right: 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  box-shadow: var(--shadow-large);
  border: 1px solid rgba(255,255,255,0.06);
  z-index: 30;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease;
}

.minimized-call:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.4); }

.minimized-call-content { padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.minimized-avatar-container { position: relative; }

.minimized-avatar-container .status-dot {
  position: absolute; bottom: 0; right: 0;
  border: 2px solid var(--bg-secondary);
}

.minimized-info { display: flex; flex-direction: column; gap: 2px; min-width: 100px; }
.minimized-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.minimized-duration { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.minimized-controls { display: flex; gap: 6px; }

.incoming-call-notification {
  position: fixed;
  top: 80px; right: 20px;
  width: 360px;
  background: var(--bg-secondary);
  border-radius: 12px;
  box-shadow: var(--shadow-large);
  border: 1px solid rgba(255,255,255,0.06);
  z-index: 100;
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
  from { transform: translateX(400px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.incoming-call-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.incoming-call-avatar { position: relative; }

.call-type-badge {
  position: absolute;
  bottom: -5px; right: -5px;
  width: 32px; height: 32px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  border: 3px solid var(--bg-secondary);
}

.incoming-call-info h3 { font-size: 20px; margin-bottom: 4px; letter-spacing: -0.02em; }
.incoming-call-info p { font-size: 14px; color: var(--text-muted); }
.incoming-call-actions { display: flex; gap: 12px; width: 100%; }

.btn-call {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s cubic-bezier(0.2, 0, 0, 1);
}

.btn-call.accept { background: var(--status-online); color: white; }
.btn-call.accept:hover { background: #2d8049; transform: translateY(-2px); }
.btn-call.reject { background: var(--danger); color: white; }
.btn-call.reject:hover { background: #c03537; transform: translateY(-2px); }

.call-ringing {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 120px; height: 120px;
  border: 3px solid var(--accent-primary);
  border-radius: 50%;
  opacity: 0;
  animation: ring-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.ring:nth-child(2) { animation-delay: 0.6s; }
.ring:nth-child(3) { animation-delay: 1.2s; }

@keyframes ring-pulse {
  0% { transform: translate(-50%, -50%) scale(0.5); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

.setting-group { margin-bottom: 20px; }

.setting-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.setting-group select {
  width: 100%;
  padding: 10px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.setting-group select:focus { border-color: var(--accent-primary); }

.mic-test-bar {
  width: 100%; height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.mic-test-level { height: 100%; background: var(--status-online); width: 0%; transition: width 0.1s ease; border-radius: 3px; }

@media (max-width: 768px) {
  .call-panel { height: 40%; }
  .call-sidebar { width: 120px; }
  .control-btn { min-width: 60px; padding: 8px 12px; }
  .control-label { font-size: 10px; }
  .incoming-call-notification { width: calc(100% - 40px); right: 20px; }
}

@media (max-width: 480px) {
  .call-sidebar { display: none; }
  .call-panel { height: 50%; }
  .control-label { display: none; }
  .control-btn { min-width: 48px; padding: 10px; }
}

.call-panel.fullscreen {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  height: 100vh !important; z-index: 9999;
}

.call-panel.fullscreen .call-sidebar { width: 150px; }
.call-panel.fullscreen .main-video-container { border-radius: 0; }

/* ==================== VOICE CONNECTION PANEL ==================== */
.voice-connection-panel {
  background: var(--bg-quaternary);
  border-top: 1px solid rgba(255,255,255,0.04);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  color: var(--status-online);
  padding: 4px 0;
  letter-spacing: -0.01em;
}

.voice-users {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 150px;
  overflow-y: auto;
  margin: 8px 0;
}

.voice-user-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--bg-hover);
  position: relative;
  transition: background 0.15s ease, border-color 0.15s ease;
  border: 1px solid transparent;
}

.voice-user-item.speaking {
  background: rgba(34, 197, 94, 0.14) !important;
  border-color: rgba(34, 197, 94, 0.35) !important;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.voice-user-avatar { width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.voice-user-avatar.muted { border-color: var(--danger, #ed4245) !important; }
.voice-user-item.speaking .voice-user-avatar {
  border-color: #22c55e !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75) !important;
  animation: speakingGlow 1.4s infinite !important;
}
.voice-user-name { flex: 1; font-size: 13px; color: var(--text-primary); }
.voice-user-status { font-size: 16px; display: inline-flex; align-items: center; justify-content: center; }
.voice-user-badge.muted { color: var(--danger, #ed4245); font-weight: bold; }

.voice-controls {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.04);
}

.voice-btn {
  width: 36px; height: 36px;
  border-radius: 50%; border: none;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 18px; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s cubic-bezier(0.2, 0, 0, 1);
  display: flex; align-items: center; justify-content: center;
}

.voice-btn:hover { background: var(--bg-hover); transform: scale(1.1); }
.voice-btn.active { background: var(--danger); color: white; }

.voice-btn-danger {
  width: 36px; height: 36px;
  border-radius: 50%; border: none;
  background: var(--danger); color: white;
  font-size: 18px; cursor: pointer;
  transition: background 0.15s ease, transform 0.15s cubic-bezier(0.2, 0, 0, 1);
  display: flex; align-items: center; justify-content: center;
}

.voice-btn-danger:hover { background: #c03537; transform: scale(1.1); }

.channel-item.voice-active { background: var(--status-online); color: white; }
.channel-item.voice-active .channel-icon { color: white; }

/* ==================== DAVET SİSTEMİ ==================== */
.invite-create-section,
.invite-link-section,
.invite-list-section {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.invite-create-section h3,
.invite-link-section h3,
.invite-list-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.invite-link-display { display: flex; gap: 8px; margin-bottom: 12px; }

.invite-link-display input {
  flex: 1; padding: 10px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  color: var(--accent-primary);
  font-family: 'Courier New', monospace;
  font-size: 13px; outline: none;
}

.invite-info {
  font-size: 12px; color: var(--text-muted);
  padding: 8px; background: var(--bg-hover);
  border-radius: 4px; margin: 0; line-height: 1.4;
}

.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.invite-item {
  background: var(--bg-hover);
  padding: 12px; border-radius: 4px; margin-bottom: 8px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; border: 1px solid rgba(255,255,255,0.04);
}

.invite-item-main { flex: 1; min-width: 0; }

.invite-code {
  font-family: 'Courier New', monospace;
  color: var(--accent-primary);
  font-weight: 600; font-size: 14px; margin-bottom: 4px;
}

.invite-stats { font-size: 12px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.invite-stat { display: flex; align-items: center; gap: 4px; }
.invite-actions { display: flex; gap: 4px; }

.invite-item.expired { opacity: 0.5; background: var(--bg-tertiary); }
.invite-item.expired .invite-code { text-decoration: line-through; color: var(--danger); }

.invite-accept-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-primary) 100%);
  padding: 20px;
}

.invite-card {
  background: var(--bg-secondary);
  border-radius: 12px; padding: 32px;
  max-width: 480px; width: 100%;
  box-shadow: var(--shadow-large);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}

.server-preview { margin-bottom: 24px; }

.server-icon-large {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; margin: 0 auto 16px;
}

.server-info { color: var(--text-muted); font-size: 14px; margin: 8px 0; }

.invite-details {
  background: var(--bg-hover); padding: 16px;
  border-radius: 8px; margin-bottom: 24px;
  text-align: left; border: 1px solid rgba(255,255,255,0.04);
}

.invite-details p { margin: 8px 0; font-size: 14px; color: var(--text-secondary); line-height: 1.4; }
.expires-text { color: var(--warning); font-size: 12px; margin-top: 12px !important; }

.btn-join {
  width: 100%; padding: 14px;
  font-size: 16px; font-weight: 600;
  background: var(--success); color: white;
  border: none; border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.15s ease;
}

.btn-join:hover { background: #2d8049; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(59,165,93,0.4); }

.invite-error { margin-top: 16px; padding: 12px; background: var(--danger); color: white; border-radius: 8px; font-size: 14px; }

@media (max-width: 480px) {
  .invite-card { padding: 24px; }
  .invite-link-display { flex-direction: column; }
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
  #chat-header { padding-left: 50px; position: relative; }
  .members-panel { position: fixed; right: -100%; top: 0; bottom: 0; width: 240px; z-index: 98; transition: right 0.3s cubic-bezier(0.2, 0, 0, 1); }
  .members-panel:not(.hidden) { right: 0; }
  .modal-content { width: 95vw; max-height: 90vh; overflow-y: auto; }
  .voice-connection-panel { padding: 8px; }
  .voice-users { max-height: 100px; }
  #messages { padding: 12px 8px 100px; display: block; }
  .message { padding: 12px 10px; height: auto; min-height: 50px; margin-top: 15px; border-radius: 12px; background: rgba(255,255,255,0.04); display: block; overflow: visible; }
  .message-content-wrapper { display: flex; gap: 12px; align-items: flex-start; height: auto; }
  .message .msg-avatar { width: 36px; min-width: 36px; height: 36px; margin-top: 2px; }
  .message-header { display: flex; align-items: center; justify-content: flex-start; gap: 6px; margin-bottom: 4px; }
  .message-body { overflow: visible; flex: 1; height: auto; min-height: fit-content; }
  .message-author { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
  .message-content { font-size: 14px; line-height: 1.5; word-break: break-word; }
  .avatar-small { width: 28px; height: 28px; }
  #chat-input { padding: 8px; gap: 4px; }
  .chat-input-btns-right .icon-btn:nth-child(n+3) { display: none; }
  #message-input { font-size: 16px; padding: 10px 6px; }
  .send-btn { padding: 8px 12px; font-size: 13px; }
  .header-right { gap: 8px; }
  .header-right .icon-btn { font-size: 18px; padding: 4px; }
  .invite-link-display { flex-direction: column; }
  .invite-link-display input { font-size: 12px; }
}

@media (max-width: 480px) {
  #sidebar { width: 100%; }
  #chat-header { padding: 0 8px 0 45px; }
  #chat-header { padding: 0 8px 0 45px; justify-content: space-between; overflow: hidden; }
  #chat-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; flex-shrink: 0; }
  #chat-topic { display: none; }
  .header-right { gap: 4px; overflow: hidden; flex: 1; justify-content: flex-end; }
  .header-right .icon-btn { font-size: 16px; padding: 4px; }
  /* Mobilde alan açmak için sadece kritik ikonları bırak */
  #call-btn, #video-btn, .mention-badge-icon, .mention-btn, .header-right .icon-btn:not(:last-child):not(:nth-last-child(2)) { display: none; }
  .message-content { font-size: 14px; word-break: break-word; line-height: 1.5; }
  .message-time { font-size: 10px; opacity: 0.7; }
  .message .msg-avatar { width: 32px; min-width: 32px; height: 32px; }
  .message { padding: 8px; margin-top: 10px; }
  .message-content-wrapper { gap: 8px; }
  .file-preview { max-width: 100%; border-radius: 4px; overflow: hidden; }
  .preview-image { max-width: 100%; max-height: 200px; object-fit: contain; }
  .message-author { font-size: 13px; font-weight: 700; max-width: 100px; }
  .voice-connection-panel { padding: 6px; }
  .voice-user-item { padding: 4px 6px; }
  .voice-user-avatar { width: 20px; height: 20px; }
  .voice-user-name { font-size: 12px; }
  .voice-btn, .voice-btn-danger { width: 32px; height: 32px; font-size: 16px; }
  .invite-card { padding: 20px; }
  .server-icon-large { width: 64px; height: 64px; font-size: 36px; }
  .invite-details { font-size: 13px; }
}

@media (max-width: 768px) and (orientation: landscape) {
  #chat-header { height: 44px; }
  .voice-connection-panel { max-height: 120px; overflow-y: auto; }
  #messages { padding: 8px; }
}

@media (hover: none) and (pointer: coarse) {
  .icon-btn, .voice-btn, .channel-item, .dm-item, .server-icon { min-height: 44px; min-width: 44px; }
  body { overscroll-behavior-y: contain; }
  .channel-item:hover, .dm-item:hover, .server-icon:hover { background: inherit; }
  .channel-item:active, .dm-item:active { background: var(--bg-hover); }
}

.mobile-menu-btn {
  display: none;
  position: absolute;
  left: 10px; top: 50%;
  transform: translateY(-50%);
  background: transparent; border: none;
  color: var(--text-primary);
  font-size: 24px; cursor: pointer;
  padding: 8px; z-index: 10;
}

@media (max-width: 768px) { .mobile-menu-btn { display: block; } }

/* ==================== MOBILE HAMBURGER MENÜ ==================== */
@media (max-width: 768px) {
  #servers {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: 72px; z-index: 101;
    background: var(--bg-tertiary);
    transform: translateX(-72px);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: 2px 0 16px rgba(0,0,0,0.4);
  }
  #servers.mobile-open { transform: translateX(0); }
  #sidebar {
    position: fixed; left: 72px; top: 0; bottom: 0;
    width: 240px; z-index: 100;
    transform: translateX(-312px);
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: 2px 0 16px rgba(0,0,0,0.4);
  }
  #sidebar.mobile-open { transform: translateX(0); }
  #main { margin-left: 0; width: 100%; }
  .mobile-menu-btn {
    display: block !important;
    position: absolute; left: 12px; top: 50%;
    transform: translateY(-50%);
    background: transparent; border: none;
    color: var(--text-primary);
    font-size: 24px; cursor: pointer;
    padding: 8px; z-index: 10;
  }
  .mobile-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7); z-index: 99; display: none;
  }
  .mobile-overlay.active { display: block; }
  #user-menu { z-index: 10000 !important; }
  .user-panel { position: relative; z-index: 102; }
}

@media (min-width: 769px) {
  .mobile-menu-btn { display: none !important; }
  .mobile-overlay { display: none !important; }
  #servers { transform: none !important; }
  #sidebar { transform: none !important; }
}

@media (max-width: 768px) {
  #servers.mobile-open { transform: translateX(0) !important; left: 0 !important; }
}

/* ==================== SES KANALI AKTİF KULLANICILAR ==================== */
.voice-channel-wrapper { display: flex; flex-direction: column; }
.voice-channel-users { padding-left: 28px; }

.voice-ch-user {
  display: flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 4px;
  cursor: default; font-size: 13px;
  color: var(--text-secondary);
  transition: background 0.1s ease, color 0.15s ease;
}

.voice-ch-user:hover { background: var(--bg-modifier); }
.voice-ch-user.speaking {
  background: rgba(34, 197, 94, 0.12) !important;
  color: #4ade80 !important;
}
.voice-ch-avatar {
  width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
  border: 2px solid transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.voice-ch-avatar.muted { border-color: var(--danger, #ed4245) !important; }
.voice-ch-user.speaking .voice-ch-avatar {
  border-color: #22c55e !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75) !important;
  animation: speakingGlow 1.4s infinite !important;
}
.voice-ch-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voice-ch-status { margin-left: auto; font-size: 12px; }

/* ==================== MULTI SCREEN SHARE GRID ==================== */
.ss-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 8px; padding: 8px;
  background: #0a0a15; border-radius: 8px;
  margin-bottom: 8px; max-height: 60vh; overflow-y: auto;
}

.ss-grid.hidden { display: none; }

.ss-slot {
  background: #111125; border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s ease;
}

.ss-slot:hover { border-color: rgba(108,92,231,0.3); }

.ss-slot-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; background: rgba(0,0,0,0.3); height: 32px;
}

.ss-slot-topbar-left { display: flex; align-items: center; gap: 8px; }

.ss-slot-username {
  font-size: 12px; font-weight: 600; color: #ccc;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}

.ss-slot-topbar-right { display: flex; align-items: center; gap: 2px; }

.ss-slot-btn {
  width: 26px; height: 26px; border: none;
  background: transparent; color: #888;
  border-radius: 4px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s ease, color 0.12s ease;
}

.ss-slot-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.ss-slot-btn-close:hover { background: rgba(224,64,64,0.3); color: #ff6b6b; }
.ss-slot-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 40vh;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ss-slot-stage video {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.ss-slot-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px;
  background: radial-gradient(ellipse at center, #16162a 0%, #0a0a15 100%);
}

.ss-slot-placeholder span { color: #555; font-size: 12px; }

/* ==================== MEMBERS PANEL (SAĞ SIDEBAR) ==================== */
.members-panel {
  width: var(--members-width);
  background: var(--bg-secondary);
  border-left: 1px solid rgba(255,255,255,0.04);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.members-content { flex: 1; overflow-y: auto; padding: 8px; }
.members-role-group { margin-bottom: 12px; }

.members-role-header {
  font-size: 12px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 16px 8px 6px;
  display: flex; align-items: center; gap: 6px;
}

.members-role-header .role-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

.member-item {
  padding: 8px; margin: 1px 0;
  border-radius: var(--border-radius-small);
  cursor: pointer;
  transition: background 0.1s cubic-bezier(0.2, 0, 0, 1);
  display: flex; align-items: center; gap: 10px;
}

.member-item:hover { background: var(--bg-hover); }
.member-item .member-avatar-wrap { position: relative; width: 32px; height: 32px; flex-shrink: 0; }
.member-item .member-avatar-wrap img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.member-item .member-info { flex: 1; min-width: 0; }
.member-item .member-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-item .member-tag { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-item .member-role-badges { display: flex; gap: 3px; flex-wrap: wrap; }
.role-badge { font-size: 10px; padding: 1px 6px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.member-item.offline { opacity: 0.4; }
.owner-crown { font-size: 12px; margin-left: 4px; }
.sidebar-header-btns { display: flex; align-items: center; gap: 4px; }

/* ==================== SERVER SETTINGS OVERLAY ==================== */
.server-settings-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-primary); z-index: 200;
  display: flex; align-items: stretch;
  animation: settingsFadeIn 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.server-settings-overlay.hidden { display: none; }

@keyframes settingsFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.server-settings-layout { display: flex; width: 100%; height: 100%; }

.settings-sidebar {
  width: 220px; background: var(--bg-secondary);
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}

.settings-sidebar-header {
  padding: 16px; font-size: 16px; font-weight: 700;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.02em;
}

.settings-nav { flex: 1; overflow-y: auto; padding: 8px; }

.settings-nav-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  padding: 16px 10px 6px;
}

.settings-nav-item {
  padding: 8px 10px; margin: 1px 0;
  border-radius: var(--border-radius-small);
  cursor: pointer; font-size: 14px;
  color: var(--text-secondary);
  transition: background 0.1s ease, color 0.1s ease;
}

.settings-nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.settings-nav-item.active { background: var(--bg-active); color: white; }
.settings-nav-item.danger { color: var(--danger); }
.settings-nav-item.danger:hover { background: rgba(237,66,69,0.1); color: var(--danger); }

.settings-nav-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 8px 0; }

.settings-content { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.settings-content-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
  box-shadow: var(--shadow-header);
}

.settings-content-header h2 { font-size: 20px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }

.settings-close-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50px; color: var(--text-secondary);
  cursor: pointer; font-size: 12px; font-weight: 600;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.settings-close-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: rgba(255,255,255,0.25); }

.settings-tab-content { flex: 1; overflow-y: auto; padding: 24px; max-width: 740px; }
.settings-tab-content.hidden { display: none; }

.settings-form-group { margin-bottom: 20px; }

.settings-form-group label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--text-muted); text-transform: uppercase;
  letter-spacing: 0.04em; margin-bottom: 8px;
}

.settings-form-group input[type="text"],
.settings-form-group input[type="email"],
.settings-form-group select,
.settings-form-group textarea {
  width: 100%; max-width: 400px; padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--border-radius-small);
  color: var(--text-primary); font-size: 14px;
  font-family: inherit; outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-form-group input:focus,
.settings-form-group select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(88,101,242,0.15);
}

.settings-info-text { font-size: 14px; color: var(--text-secondary); padding: 8px 0; line-height: 1.5; }

.color-picker-row { display: flex; align-items: center; gap: 12px; }

.color-picker-row input[type="color"] {
  width: 48px; height: 36px; border: none;
  border-radius: var(--border-radius-small);
  cursor: pointer; background: transparent; padding: 0;
}

.color-text { font-family: 'Courier New', monospace; font-size: 14px; color: var(--text-secondary); }

/* ==================== ROLES TAB ==================== */
.roles-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.roles-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }

.role-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: var(--border-radius-small);
  cursor: pointer;
  transition: background 0.12s ease, transform 0.12s ease;
  border: 1px solid transparent;
}

.role-list-item:hover { background: var(--bg-hover); }
.role-list-item.active { background: var(--bg-active); border-color: var(--accent-primary); }
.role-list-item.dragging { opacity: 0.4; transform: scale(0.98); }
.role-list-item.drag-over { border-top: 2px solid var(--accent-primary); }

.role-drag-handle { cursor: grab; color: var(--text-muted); font-size: 16px; user-select: none; flex-shrink: 0; line-height: 1; }
.role-drag-handle:active { cursor: grabbing; }

.role-color-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.1); }
.role-list-item-info { flex: 1; min-width: 0; }
.role-list-item-name { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-list-item-count { font-size: 12px; color: var(--text-muted); }

.role-editor { background: var(--bg-secondary); border-radius: var(--border-radius); padding: 20px; border: 1px solid rgba(255,255,255,0.06); }
.role-editor.hidden { display: none; }
.role-editor-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.role-editor-header h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.01em; }
.role-editor-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); }

.permissions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.perm-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--bg-tertiary);
  border-radius: var(--border-radius-small);
  cursor: pointer; transition: background 0.12s ease;
}

.perm-toggle:hover { background: var(--bg-hover); }
.perm-toggle-info { display: flex; flex-direction: column; gap: 2px; }
.perm-toggle-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.perm-toggle-desc { font-size: 11px; color: var(--text-muted); }

.toggle-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute; cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-hover); border-radius: 11px;
  transition: background 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.toggle-slider:before {
  content: ""; position: absolute;
  height: 16px; width: 16px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.toggle-switch input:checked + .toggle-slider { background: var(--status-online); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(18px); }

/* ==================== MEMBERS TAB (Settings) ==================== */
.settings-search { margin-bottom: 16px; }

.settings-search input {
  width: 100%; padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--border-radius-small);
  color: var(--text-primary); font-size: 14px; outline: none;
  transition: border-color 0.15s ease;
}

.settings-search input:focus { border-color: var(--accent-primary); }
.settings-members-list { display: flex; flex-direction: column; gap: 4px; }

.settings-member-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--bg-secondary);
  border-radius: var(--border-radius-small);
  transition: background 0.12s ease;
}

.settings-member-item:hover { background: var(--bg-hover); }
.settings-member-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.settings-member-info { flex: 1; min-width: 0; }
.settings-member-name { font-size: 14px; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 6px; }
.settings-member-joined { font-size: 12px; color: var(--text-muted); }
.settings-member-roles { display: flex; gap: 4px; flex-wrap: wrap; }
.settings-member-actions { display: flex; gap: 6px; flex-shrink: 0; }

.settings-member-actions button {
  padding: 4px 10px; font-size: 12px; border: none;
  border-radius: var(--border-radius-small); cursor: pointer;
  font-weight: 600; transition: background 0.12s ease;
}

.settings-member-actions .btn-role-add { background: var(--accent-primary); color: white; }
.settings-member-actions .btn-role-add:hover { background: var(--accent-hover); }
.settings-member-actions .btn-kick { background: var(--danger); color: white; }
.settings-member-actions .btn-kick:hover { background: #c03537; }

.settings-invites-list { display: flex; flex-direction: column; gap: 8px; }

.channels-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.settings-channels-list { display: flex; flex-direction: column; gap: 4px; }

.settings-channel-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--bg-secondary);
  border-radius: var(--border-radius-small); transition: background 0.12s ease;
}

.settings-channel-item:hover { background: var(--bg-hover); }
.settings-channel-icon { font-size: 20px; color: var(--text-muted); width: 24px; text-align: center; flex-shrink: 0; }
.settings-channel-info { flex: 1; min-width: 0; }
.settings-channel-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.settings-channel-topic { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.settings-channel-actions { display: flex; gap: 6px; flex-shrink: 0; }

.settings-channel-actions button {
  padding: 4px 10px; font-size: 12px; border: none;
  border-radius: var(--border-radius-small); cursor: pointer;
  font-weight: 600; transition: background 0.12s ease;
  background: var(--bg-hover); color: var(--text-secondary);
}

.settings-channel-actions button:hover { background: var(--bg-active); color: var(--text-primary); }
.settings-channel-actions .btn-ch-delete { color: var(--danger); }
.settings-channel-actions .btn-ch-delete:hover { background: rgba(237,66,69,0.1); }

.role-assign-dropdown {
  position: absolute; background: var(--bg-tertiary);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-large);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 6px; z-index: 210;
  min-width: 180px; max-height: 200px; overflow-y: auto;
}

.role-assign-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: var(--border-radius-small);
  cursor: pointer; font-size: 13px;
  color: var(--text-primary); transition: background 0.1s ease;
}

.role-assign-item:hover { background: var(--accent-primary); color: white; }
.role-assign-item .role-assign-check { font-size: 14px; width: 18px; text-align: center; }

/* ==================== RESPONSIVE SERVER SETTINGS ==================== */
@media (max-width: 768px) {
  .server-settings-overlay { z-index: 500; flex-direction: column; }
  .server-settings-layout { flex-direction: column; height: 100%; }
  .settings-sidebar { width: 100%; flex-shrink: 0; max-height: 50px; overflow: hidden; transition: max-height 0.3s cubic-bezier(0.2, 0, 0, 1); cursor: pointer; position: relative; }
  .settings-sidebar::after { content: '▼'; position: absolute; right: 16px; top: 16px; font-size: 12px; color: var(--text-muted); transition: transform 0.3s ease; }
  .settings-sidebar.expanded::after { transform: rotate(180deg); }
  .settings-sidebar.expanded { max-height: 60vh; overflow-y: auto; }
  .settings-tab-content { padding: 12px; flex: 1; overflow-y: auto; }
  .permissions-grid { grid-template-columns: 1fr; }
  .settings-close-btn { position: fixed !important; top: 8px; right: 8px; z-index: 501; font-size: 28px; }
  .modal-overlay { z-index: 600; }
  .modal { z-index: 601; width: 95vw !important; max-width: 95vw !important; max-height: 90vh !important; }
  .channel-perms-modal { max-width: 95vw !important; }
}

/* ==================== CONTEXT MENU ==================== */
.context-menu {
  position: fixed;
  z-index: 20000;
  background: #111214;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 6px;
  min-width: 180px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04),
              0 8px 24px rgba(0,0,0,0.5),
              0 2px 6px rgba(0,0,0,0.3);
  animation: contextFadeIn 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes contextFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(-2px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.context-menu-item {
  padding: 8px 10px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  transition: background 0.08s ease, color 0.08s ease;
}

.context-menu-item:hover { background: var(--accent-primary); color: white; }

.context-menu-item span { font-size: 16px; width: 20px; text-align: center; }

.context-menu-item.danger, .context-menu-danger { color: #ed4245; }
.context-menu-item.danger:hover, .context-menu-danger:hover { background: #ed4245; color: white; }

.context-menu-separator {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 4px 6px;
}

/* ==================== MESAJ ACTIONS BAR (HOVER) ==================== */
/* Message position handled above */


.message-actions-bar {
  position: absolute;
  top: -8px; right: 8px;
  display: none;
  gap: 2px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.message:hover .message-actions-bar { display: flex; }

.msg-action-btn {
  background: none; border: none;
  cursor: pointer; padding: 4px 6px;
  border-radius: 3px; font-size: 14px;
  line-height: 1; transition: background 0.08s ease, color 0.08s ease;
  color: var(--text-muted);
}

.msg-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ==================== EDITED TAG ==================== */
.edited-tag { font-size: 10px; color: var(--text-muted); font-style: italic; }

/* ==================== PIN ==================== */
.message.pinned {
  border-left: 2px solid #faa61a;
  background: rgba(250,166,26,0.04);
}

.pin-icon { font-size: 12px; margin-left: 4px; }

.pinned-message-item {
  background: var(--bg-primary);
  border-radius: 8px; padding: 12px; margin-bottom: 8px;
}

.pinned-msg-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pinned-msg-author { color: var(--text-primary); font-weight: 600; font-size: 13px; }
.pinned-msg-time { color: var(--text-muted); font-size: 11px; }
.pinned-msg-content { color: var(--text-primary); font-size: 14px; word-break: break-word; }

/* ==================== EDIT CONTAINER ==================== */
.edit-container {
  background: var(--bg-primary);
  border: 1px solid var(--brand-color);
  border-radius: 6px; padding: 8px;
}

.edit-input {
  width: 100%; background: var(--bg-primary);
  color: var(--text-primary); border: none;
  font-size: 14px; resize: vertical;
  min-height: 40px; max-height: 200px;
  outline: none; font-family: inherit;
  line-height: 1.375;
}

.edit-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }

.edit-hint { color: var(--text-muted); font-size: 11px; display: block; margin-top: 4px; }

.btn-cancel {
  background: transparent; color: var(--text-muted);
  border: none; padding: 4px 10px;
  border-radius: 3px; cursor: pointer; font-size: 12px;
  transition: color 0.12s ease;
}

.btn-cancel:hover { text-decoration: underline; color: var(--text-primary); }

.btn-save {
  background: var(--brand-color); color: white;
  border: none; padding: 4px 12px;
  border-radius: 3px; cursor: pointer; font-size: 12px;
  transition: background 0.12s ease;
}

.btn-save:hover { background: #4752c4; }

/* ==================== REACTION SİSTEMİ ==================== */
.message-reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

.reaction-badge {
  display: inline-flex;
  align-items: center; gap: 4px;
  background: var(--bg-modifier);
  border: 1px solid transparent;
  border-radius: 8px; padding: 2px 8px;
  cursor: pointer; font-size: 14px;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.reaction-badge:hover { background: var(--bg-primary); border-color: rgba(255,255,255,0.15); }

.reaction-badge.active {
  background: rgba(88,101,242,0.15);
  border-color: var(--brand-color);
}

.reaction-count { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.reaction-badge.active .reaction-count { color: var(--brand-color); }

/* Reaction Picker */
.reaction-picker {
  position: fixed; z-index: 10001;
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  max-width: 340px;
  animation: contextFadeIn 0.12s cubic-bezier(0.16, 1, 0.3, 1);
}

.reaction-quick {
  display: flex; gap: 4px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 8px;
}

.reaction-quick-item {
  font-size: 22px; cursor: pointer;
  padding: 4px 6px; border-radius: 6px;
  transition: background 0.1s ease, transform 0.1s ease;
}

.reaction-quick-item:hover { background: var(--bg-hover); transform: scale(1.1); }

.reaction-all { display: flex; flex-wrap: wrap; gap: 2px; max-height: 200px; overflow-y: auto; }

.reaction-all-item {
  font-size: 18px; cursor: pointer;
  padding: 3px; border-radius: 4px;
  transition: background 0.1s ease, transform 0.1s ease;
}

.reaction-all-item:hover { background: var(--bg-hover); transform: scale(1.1); }

/* ==================== USER PROFILE POPUP ==================== */
.user-profile-card { max-width: 380px; overflow: hidden; }

.up-banner {
  height: 100px;
  background: linear-gradient(135deg, var(--brand-color), #7289da);
  background-size: cover; background-position: center;
  border-radius: 8px 8px 0 0;
}

.up-info { padding: 0 16px 16px; margin-top: -30px; }

.up-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 5px solid var(--bg-secondary);
  object-fit: cover;
}

.up-name-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.up-username { font-size: 20px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.02em; }
.up-custom-status { color: var(--text-muted); font-size: 13px; margin-top: 2px; }
.up-divider { height: 1px; background: var(--bg-modifier); margin: 12px 0; }
.up-section { margin-bottom: 12px; }

.up-section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; color: var(--text-muted);
  letter-spacing: 0.04em; margin-bottom: 6px;
}

.up-bio { color: var(--text-primary); font-size: 13px; line-height: 1.4; }
.up-joined { color: var(--text-primary); font-size: 13px; }
.up-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.up-mutual-servers { display: flex; flex-direction: column; gap: 4px; }

.mutual-server-item {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; background: var(--bg-primary);
  border-radius: 4px; font-size: 13px; color: var(--text-primary);
}

.mutual-server-icon {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-modifier);
  border-radius: 50%; font-size: 12px;
}

/* ==================== PROFİL AYARLARI ==================== */
.ps-avatar-section { display: flex; justify-content: center; margin-bottom: 16px; }

.ps-avatar-preview {
  width: 96px; height: 96px;
  border-radius: 50%; object-fit: cover;
  border: 3px solid var(--brand-color);
}

/* ==================== DOSYA ÖNİZLEME ==================== */
/* .file-preview handled above */


.preview-image {
  max-width: 400px; max-height: 300px;
  border-radius: 8px; cursor: pointer;
  transition: opacity 0.12s ease;
}

.preview-image:hover { opacity: 0.9; }
.preview-video { max-width: 400px; max-height: 300px; border-radius: 8px; }
.preview-audio { max-width: 400px; }

/* ==================== MESAJ LİNKLERİ ==================== */
.message-link { color: #00aff4; text-decoration: none; word-break: break-all; }
.message-link:hover { text-decoration: underline; }

/* ==================== TYPING INDICATOR ==================== */
#typing-indicator { font-size: 12px; color: var(--text-muted); padding: 2px 16px; min-height: 20px; }

/* ==================== MSG AVATAR (genel fallback) ==================== */
/* Ana mesaj stilleri MESSAGES bölümünde tanımlı */

/* ==================== EMPTY STATE ==================== */
.empty-state { text-align: center; color: var(--text-muted); padding: 24px; font-size: 14px; }
.text-muted { color: var(--text-muted); font-size: 13px; }

/* ==================== REPLY BAR ==================== */
#reply-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  border-left: 3px solid var(--brand-color);
  padding: 8px 12px;
  margin: 0 16px;
  border-radius: 4px 4px 0 0;
  animation: slideUp 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.reply-bar-content { display: flex; flex-direction: column; gap: 2px; overflow: hidden; flex: 1; }
.reply-bar-label { font-size: 12px; color: var(--text-secondary); }
.reply-bar-preview { font-size: 13px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.reply-bar-close {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  font-size: 16px; padding: 4px 8px; border-radius: 4px;
  transition: background 0.1s ease, color 0.1s ease;
}

.reply-bar-close:hover { background: var(--bg-modifier); color: var(--text-primary); }

/* ==================== REPLY PREVIEW IN MESSAGE ==================== */
.reply-preview {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px 4px 12px; margin-bottom: 4px;
  border-left: 2px solid #5865f2;
  font-size: 12px; color: var(--text-muted);
  cursor: pointer; border-radius: 2px;
  background: var(--bg-secondary);
  transition: background 0.1s ease;
}

.reply-preview:hover { background: var(--bg-modifier); }
.reply-author { color: #5865f2; font-weight: 600; margin-right: 4px; }
.reply-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== MENTION HIGHLIGHT ==================== */
.mention {
  background: rgba(88,101,242,0.15); color: #5865f2;
  padding: 0 2px; border-radius: 3px;
  font-weight: 500; cursor: pointer;
  transition: background 0.1s ease;
}

.mention:hover { background: rgba(88,101,242,0.3); }
.mention-self { background: rgba(88,101,242,0.25); }

.message.mentioned {
  background: rgba(250,166,26,0.05);
  border-left: 2px solid #faa61a;
}

.message.highlight { animation: highlightFlash 2s ease; }

@keyframes highlightFlash {
  0%, 100% { background: transparent; }
  20% { background: rgba(88,101,242,0.15); }
}

/* ==================== MENTION BADGE ==================== */
.mention-btn { position: relative; }

.mention-badge-icon {
  position: absolute; top: -4px; right: -4px;
  background: #ed4245; color: white;
  font-size: 10px; min-width: 16px; height: 16px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ==================== UNREAD BADGE ==================== */
.channel-item.unread { color: var(--text-primary); font-weight: 600; }
.channel-item.unread .channel-name { color: white; }

.unread-badge {
  background: #ed4245; color: white;
  font-size: 10px; min-width: 16px; height: 16px;
  border-radius: 8px; display: inline-flex;
  align-items: center; justify-content: center;
  padding: 0 4px; margin-left: auto; font-weight: 700;
}

/* ==================== KANAL KATEGORİLERİ ==================== */
.category-header {
  display: flex; align-items: center; gap: 4px;
  padding: 16px 8px 4px;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); letter-spacing: 0.04em;
  cursor: pointer; user-select: none;
  transition: color 0.1s ease;
}

.category-header:hover { color: var(--text-secondary); }

.category-toggle { font-size: 10px; transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1); }
.category-header.collapsed .category-toggle { transform: rotate(-90deg); }
.category-channels { padding-left: 8px; }
.category-channels.hidden { display: none; }

/* ==================== THREAD PANEL ==================== */
.thread-panel {
  position: fixed; right: 0; top: 0;
  width: 360px; height: 100vh;
  background: var(--bg-primary);
  border-left: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column;
  z-index: 200;
  animation: slideInRight 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.thread-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-weight: 600; color: var(--text-primary);
  box-shadow: var(--shadow-header);
}

.thread-messages { flex: 1; overflow-y: auto; padding: 12px; }
.thread-message { padding: 6px 8px; font-size: 13px; }

.thread-input-area {
  display: flex; gap: 8px; padding: 12px;
  background: var(--bg-secondary);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.thread-input-area input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px; padding: 8px 12px;
  color: var(--text-primary); outline: none;
  transition: border-color 0.15s ease;
}

.thread-input-area input:focus { border-color: var(--accent-primary); }

.thread-input-area .send-btn {
  padding: 8px 16px; background: #5865f2;
  color: white; border: none; border-radius: 4px; cursor: pointer;
  transition: background 0.12s ease;
}

.thread-input-area .send-btn:hover { background: var(--accent-hover); }

.thread-list-item { padding: 12px; border-radius: 6px; cursor: pointer; margin-bottom: 4px; transition: background 0.1s ease; }
.thread-list-item:hover { background: var(--bg-modifier); }
.thread-list-name { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.thread-list-info { font-size: 12px; color: var(--text-muted); }

/* ==================== SEARCH RESULTS ==================== */
.search-result-item {
  padding: 12px; border-radius: 6px; margin-bottom: 4px;
  border-left: 2px solid transparent;
  transition: background 0.1s ease, border-color 0.1s ease;
}

.search-result-item:hover { background: var(--bg-modifier); border-left-color: #5865f2; }
.search-result-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.search-result-content { font-size: 13px; color: var(--text-secondary); padding-left: 40px; }

.search-result-content mark {
  background: rgba(250,166,26,0.3); color: var(--text-primary);
  padding: 1px 2px; border-radius: 2px;
}

/* ==================== MENTION ITEMS ==================== */
.mention-item { padding: 12px; border-radius: 6px; margin-bottom: 4px; border-left: 2px solid #5865f2; }
.mention-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.mention-content { font-size: 13px; color: var(--text-secondary); padding-left: 40px; }

/* ==================== BLOCKED USERS ==================== */
.blocked-user-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 6px;
  transition: background 0.1s ease;
}

.blocked-user-item:hover { background: var(--bg-modifier); }

/* ==================== BAN LIST ==================== */
.ban-list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 6px;
  transition: background 0.1s ease;
}

.ban-list-item:hover { background: var(--bg-modifier); }

.ban-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ban-info small { color: var(--text-muted); font-size: 11px; }

/* ==================== USER PROFILE NOTE ==================== */
.up-note {
  width: 100%; background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px; padding: 8px;
  resize: vertical; font-size: 13px;
  font-family: inherit; outline: none;
  transition: border-color 0.15s ease;
}

.up-note:focus { border-color: #5865f2; }

.up-actions { display: flex; gap: 8px; padding: 12px 0 0; }
.up-actions .btn-small { flex: 1; }

/* ==================== GROUP DM ==================== */
.group-dm-friend { padding: 6px 0; }

.group-dm-friend label {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
  transition: background 0.1s ease;
}

.group-dm-friend label:hover { background: var(--bg-modifier); }
.group-dm-checkbox { accent-color: #5865f2; }

/* ==================== CHANNEL NAME FLEX ==================== */
.channel-item { display: flex; align-items: center; gap: 4px; }
.channel-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==================== MARKDOWN STYLES ==================== */
.code-block {
  background: #1e1e2e;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px; padding: 12px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px; overflow-x: auto;
  white-space: pre-wrap; word-break: break-all;
  margin: 4px 0; color: #a6e3a1;
}

.inline-code {
  background: #2b2d31; padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 13px; color: #f38ba8;
}

.spoiler {
  background: rgba(255,255,255,0.08); color: transparent;
  border-radius: 3px; padding: 0 4px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
  user-select: none;
}

.spoiler.revealed { background: rgba(88,101,242,0.1); color: var(--text-primary); }
.spoiler:hover:not(.revealed) { background: rgba(255,255,255,0.12); }

.msg-quote {
  border-left: 3px solid #5865f2;
  padding: 4px 12px; margin: 4px 0;
  color: var(--text-secondary);
  background: rgba(88,101,242,0.05);
  border-radius: 0 4px 4px 0;
}

.msg-h1 { font-size: 1.5em; font-weight: 700; display: block; margin: 8px 0 4px; color: var(--text-primary); }
.msg-h2 { font-size: 1.25em; font-weight: 600; display: block; margin: 6px 0 3px; color: var(--text-primary); }
.msg-h3 { font-size: 1.1em; font-weight: 600; display: block; margin: 4px 0 2px; color: var(--text-primary); }

strong { color: var(--text-primary); }
em { font-style: italic; }
del { text-decoration: line-through; opacity: 0.7; }

/* ==================== QUICK SWITCHER (Ctrl+K) ==================== */
.quick-switcher {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.75);
  display: flex; align-items: flex-start;
  justify-content: center; padding-top: 15vh;
  animation: fadeIn 0.15s cubic-bezier(0.2, 0, 0, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.qs-container {
  background: var(--bg-secondary);
  border-radius: 8px; width: 550px; max-width: 90vw;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5),
              0 0 0 1px rgba(255,255,255,0.06);
  overflow: hidden;
}

.qs-container input {
  width: 100%; padding: 16px 20px;
  background: transparent; border: none;
  color: var(--text-primary); font-size: 16px;
  outline: none; border-bottom: 1px solid rgba(255,255,255,0.06);
}

.qs-results { max-height: 300px; overflow-y: auto; }

.qs-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; cursor: pointer;
  transition: background 0.08s ease;
}

.qs-item:hover { background: var(--bg-modifier); }

.qs-item-icon {
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-primary);
  border-radius: 50%; font-size: 12px;
  font-weight: 700; color: var(--text-muted);
}

.qs-item-name { flex: 1; color: var(--text-primary); font-weight: 500; }
.qs-item-sub { color: var(--text-muted); font-size: 12px; }
.qs-empty { padding: 20px; text-align: center; color: var(--text-muted); }
.qs-hint { padding: 8px 20px; font-size: 11px; color: var(--text-muted); background: var(--bg-primary); }

/* ==================== POLL (ANKET) ==================== */
.poll-embed {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px; padding: 16px; margin: 8px 0; max-width: 400px;
}

.poll-header { font-weight: 700; color: var(--text-primary); margin-bottom: 12px; font-size: 15px; }
.poll-options { display: flex; flex-direction: column; gap: 6px; }

.poll-option {
  position: relative; padding: 10px 12px;
  border-radius: 6px; cursor: pointer; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.15s ease;
}

.poll-option:hover { border-color: #5865f2; }
.poll-option.voted { border-color: #5865f2; }

.poll-option-bar {
  position: absolute; left: 0; top: 0; height: 100%;
  background: rgba(88,101,242,0.15); border-radius: 6px;
  transition: width 0.5s cubic-bezier(0.2, 0, 0, 1);
}

.poll-option-text { position: relative; z-index: 1; color: var(--text-primary); font-size: 14px; }
.poll-option-pct { position: relative; z-index: 1; float: right; color: var(--text-muted); font-size: 13px; font-weight: 600; }
.poll-footer { margin-top: 8px; font-size: 12px; color: var(--text-muted); }

.poll-option-input {
  width: 100%; padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px; color: var(--text-primary); outline: none;
  transition: border-color 0.15s ease;
}

.poll-option-input:focus { border-color: #5865f2; }

/* ==================== DISCOVER (SUNUCU KEŞFET) ==================== */
.discover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.discover-server-card {
  background: var(--bg-primary); border-radius: 8px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.2s ease;
}

.discover-server-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(0,0,0,0.3); }

.discover-banner {
  height: 100px;
  background: linear-gradient(135deg, #5865f2, #eb459e);
  background-size: cover; background-position: center;
}

.discover-banner.default-banner { background: linear-gradient(135deg, #5865f2, #eb459e); }

.discover-info { padding: 16px; }

.discover-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; margin-top: -40px;
  border: 4px solid var(--bg-primary); color: var(--text-primary);
}

.discover-name { font-weight: 700; font-size: 16px; color: var(--text-primary); margin-top: 8px; letter-spacing: -0.01em; }

.discover-desc {
  font-size: 13px; color: var(--text-muted); margin: 4px 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

.discover-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }

/* ==================== AUDIT LOG ==================== */
.audit-log-item {
  padding: 10px 12px; border-radius: 6px; margin-bottom: 4px;
  transition: background 0.1s ease;
}
.audit-log-item:hover { background: var(--bg-hover); }
.audit-log-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.audit-log-action { color: var(--text-secondary); font-size: 13px; }
.audit-log-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; padding-left: 40px; }

/* ==================== WEBHOOK ==================== */
.webhook-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px; border-radius: 8px; margin-bottom: 4px;
  background: var(--bg-primary); border: 1px solid var(--border-color);
  transition: border-color 0.12s ease;
}
.webhook-item:hover { border-color: rgba(255,255,255,0.1); }
.webhook-info { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.webhook-info small { color: var(--text-muted); font-size: 11px; }
.webhook-url {
  background: #1e1e2e; padding: 4px 8px; border-radius: 3px;
  font-size: 11px; color: #a6e3a1; word-break: break-all;
  margin-top: 4px; display: inline-block;
}

/* ==================== DRAG & DROP OVERLAY ==================== */
.drop-overlay {
  position: absolute; inset: 0;
  background: rgba(88,101,242,0.12);
  border: 3px dashed var(--accent-primary);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  z-index: 100; pointer-events: none;
  backdrop-filter: blur(4px);
}
.drop-overlay.hidden { display: none; }
.drop-text {
  font-size: 20px; font-weight: 700; color: var(--accent-primary);
  background: var(--bg-secondary); padding: 20px 40px;
  border-radius: 8px; box-shadow: var(--shadow-large);
}

/* ==================== SERVER FOLDER ==================== */
.server-folder { position: relative; margin-bottom: 4px; }
.server-folder-icon {
  width: 48px; height: 48px; border-radius: 16px;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  cursor: pointer;
  transition: border-radius 0.25s cubic-bezier(0.2, 0, 0, 1), background 0.15s ease;
  border: 2px solid var(--folder-color, #5865f2);
}
.server-folder-icon:hover {
  border-radius: 12px;
  background: var(--folder-color, #5865f2);
  color: white;
}
.server-folder-dropdown {
  position: absolute; left: 60px; top: 0;
  background: var(--bg-secondary); border-radius: 8px;
  padding: 8px; box-shadow: var(--shadow-large);
  z-index: 200; display: flex; flex-direction: column;
  gap: 4px; min-width: 180px;
}
.server-folder-dropdown.hidden { display: none; }

/* ==================== DISCOVER ICON ==================== */
.server-icon.discover { background: var(--bg-secondary); color: #57f287; font-size: 18px; }
.server-icon.discover:hover { background: #57f287; color: white; border-radius: 35%; }

/* ==================== ACTIVITY STATUS ==================== */
.activity-status {
  font-size: 11px; color: var(--text-muted);
  display: flex; align-items: center; gap: 4px; margin-top: 2px;
}
.activity-icon { font-size: 12px; }

/* ==================== DM ITEM ==================== */
.dm-item {
  display: flex; align-items: center;
  padding: 8px 12px; cursor: pointer;
  border-radius: 4px; margin: 1px 8px;
  transition: background 0.12s ease;
}
.dm-item:hover { background: var(--bg-modifier-hover); }
.dm-item.active { background: var(--bg-modifier-selected); }
.dm-item .avatar { width: 32px; height: 32px; border-radius: 50%; margin-right: 12px; flex-shrink: 0; }
.dm-item .dm-name {
  font-size: 14px; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dm-item.active .dm-name { color: #fff; }

/* ==================== REMOTE VIDEO VIEW ==================== */
.remote-video-view {
  position: relative; width: 100%; height: 100%;
  background: #1a1a2e; display: flex; align-items: center; justify-content: center;
}
.remote-video-view video { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* ==================== INCOMING CALL INFO ==================== */
.incoming-call-info { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.incoming-call-info h3 { color: #fff; margin: 0; font-size: 18px; }
.incoming-call-info p { color: #b9bbbe; margin: 0; font-size: 14px; }

/* ==================== INVITE MODAL SECTIONS ==================== */
.invite-link-section {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-tertiary); padding: 10px 12px;
  border-radius: 4px; margin-bottom: 16px;
}
.invite-link-section input { flex: 1; background: transparent; border: none; color: var(--text-secondary); font-size: 14px; outline: none; }
.invite-create-section { display: flex; flex-direction: column; gap: 12px; }
.invite-create-section label { color: var(--text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.invite-create-section select,
.invite-create-section input {
  background: var(--bg-tertiary); border: 1px solid var(--border-color);
  color: var(--text-secondary); padding: 8px; border-radius: 4px;
}

/* ==================== PROFILE SETTINGS DIVIDER ==================== */
.ps-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 16px 0; }

/* ==================== SCREEN SHARE CONTROLS ==================== */
.ss-close-btn, .ss-fullscreen-btn, .ss-pip-btn {
  background: rgba(0,0,0,0.6); border: none;
  color: #fff; width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.ss-close-btn:hover { background: #ed4245; }
.ss-fullscreen-btn:hover, .ss-pip-btn:hover { background: rgba(255,255,255,0.2); }
.remote-audio { display: none; }

/* ==================== FORUM KANALLARI ==================== */
.forum-container { padding: 16px 24px; max-width: 900px; margin: 0 auto; }
.forum-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.forum-header h2 { color: #fff; margin: 0; }
.forum-actions { display: flex; gap: 10px; align-items: center; }
.forum-actions select {
  background: var(--bg-secondary); color: var(--text-secondary);
  border: 1px solid var(--border-color); padding: 6px 10px;
  border-radius: 4px; font-size: 13px;
}
.forum-posts-list { display: flex; flex-direction: column; gap: 8px; }
.forum-post-card {
  background: var(--bg-secondary); border-radius: 8px;
  padding: 16px; cursor: pointer;
  transition: background 0.12s ease, transform 0.1s ease, border-color 0.12s ease;
  border: 1px solid transparent;
}
.forum-post-card:hover { background: var(--bg-primary); border-color: var(--accent-primary); transform: translateY(-1px); }
.forum-post-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.forum-post-author { font-weight: 600; color: #fff; font-size: 14px; }
.forum-post-time { color: var(--text-muted); font-size: 12px; }
.forum-post-title { color: #fff; margin: 0 0 8px; font-size: 18px; }
.forum-post-preview { color: var(--text-secondary); font-size: 14px; line-height: 1.5; margin: 0 0 12px; }
.forum-post-footer { display: flex; align-items: center; gap: 16px; }
.forum-post-stats { color: var(--text-muted); font-size: 13px; }
.forum-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.forum-tag { background: rgba(88,101,242,0.2); color: #8a9df5; padding: 2px 8px; border-radius: 12px; font-size: 12px; }
.forum-pinned, .forum-locked { font-size: 14px; }
.forum-post-detail { padding: 16px 24px; }
.forum-post-full { background: var(--bg-secondary); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.forum-post-full h2 { color: #fff; margin: 12px 0; }
.forum-post-body { color: var(--text-secondary); line-height: 1.6; font-size: 15px; }
.forum-replies-section { margin-top: 16px; }
.forum-replies-section h3 { color: #fff; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.forum-reply { display: flex; gap: 12px; padding: 12px; border-radius: 4px; margin-bottom: 4px; }
.forum-reply:hover { background: var(--bg-secondary); }
.forum-reply-content { flex: 1; }
.forum-reply-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.forum-reply-header strong { color: #fff; }
.btn-back { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 14px; padding: 8px 0; margin-bottom: 12px; }
.btn-back:hover { color: #fff; }

/* ==================== SESLİ MESAJ OYNATICI ==================== */
.voice-message-player {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-secondary); padding: 10px 14px;
  border-radius: 20px; min-width: 240px; max-width: 360px;
  border: 1px solid var(--border-color);
}
.vm-play-btn { background: none; border: none; cursor: pointer; font-size: 20px; padding: 0; line-height: 1; }
.vm-waveform { flex: 1; height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; overflow: hidden; cursor: pointer; }
.vm-progress { height: 100%; background: var(--accent-primary); border-radius: 3px; transition: width 0.1s linear; }
.vm-duration { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; min-width: 40px; text-align: right; }

/* ==================== SES KAYIT BARI ==================== */
.voice-record-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; background: var(--bg-secondary);
  border-radius: 8px; margin: 0 16px 8px;
}
.voice-record-indicator { display: flex; align-items: center; gap: 8px; flex: 1; }
.recording-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ed4245; animation: pulse-recording 1s infinite;
}
@keyframes pulse-recording {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
#voice-record-timer { color: #ed4245; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ==================== AUTO-MOD KURALLAR ==================== */
.automod-rule {
  background: var(--bg-secondary); border-radius: 8px;
  padding: 14px 16px; margin-bottom: 8px;
  border-left: 3px solid var(--success);
  transition: background 0.1s ease;
}
.automod-rule.disabled { opacity: 0.5; border-left-color: var(--text-muted); }
.automod-rule-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.automod-rule-header strong { color: #fff; font-size: 15px; }
.automod-type-badge { font-size: 12px; color: var(--text-secondary); margin-left: 8px; }
.automod-actions { display: flex; align-items: center; gap: 10px; }
.automod-rule-details { display: flex; gap: 16px; color: var(--text-muted); font-size: 13px; }
.automod-rule-details code { background: var(--bg-primary); padding: 1px 4px; border-radius: 3px; font-size: 12px; }

/* Toggle Switch */
.toggle-switch { position: relative; display: inline-block; width: 40px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background: var(--text-muted); border-radius: 24px;
  transition: background 0.25s ease;
}
.toggle-slider::before {
  content: ""; position: absolute;
  height: 18px; width: 18px; left: 3px; bottom: 3px;
  background: white; border-radius: 50%;
  transition: transform 0.25s cubic-bezier(0.2, 0, 0, 1);
}
.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); }

/* ==================== BOOKMARK ==================== */
.bookmark-item {
  background: var(--bg-secondary); border-radius: 6px;
  padding: 12px; margin-bottom: 8px;
  border: 1px solid var(--border-color);
  transition: border-color 0.12s ease;
}
.bookmark-item:hover { border-color: rgba(255,255,255,0.1); }
.bookmark-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.bookmark-header strong { color: #fff; }
.bookmark-content { color: var(--text-secondary); font-size: 14px; margin-bottom: 8px; line-height: 1.4; }

/* ==================== STICKER GRİD ==================== */
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.sticker-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px; border-radius: 8px; cursor: pointer;
  transition: background 0.12s ease;
}
.sticker-item:hover { background: var(--bg-hover); }
.sticker-item img { width: 80px; height: 80px; object-fit: contain; border-radius: 4px; }
.sticker-item span {
  color: var(--text-muted); font-size: 11px; margin-top: 4px;
  text-align: center; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 90px;
}

/* ==================== TEMPLATE KARTLARI ==================== */
.templates-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.template-card {
  background: var(--bg-secondary); border-radius: 8px; padding: 16px;
  border: 1px solid var(--border-color);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.template-card:hover { border-color: var(--accent-primary); transform: translateY(-1px); }
.template-card h3 { color: #fff; margin: 0 0 8px; font-size: 16px; }
.template-card p { color: var(--text-secondary); font-size: 13px; margin: 0 0 12px; line-height: 1.4; }
.template-meta { display: flex; gap: 12px; color: var(--text-muted); font-size: 12px; margin-bottom: 12px; }

/* .file-preview / .preview-image handled above */
.preview-video { max-width: 100%; max-height: 350px; border-radius: 8px; }
.preview-audio { width: 100%; max-width: 350px; }
.file-attachment {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-secondary); padding: 12px 16px;
  border-radius: 8px; border: 1px solid var(--border-color);
  max-width: 350px;
}
.file-icon { font-size: 28px; flex-shrink: 0; }
.file-link { color: #00aff4; text-decoration: none; word-break: break-all; font-size: 14px; flex: 1; }
.file-link:hover { text-decoration: underline; }
.file-download-btn { text-decoration: none; font-size: 16px; cursor: pointer; flex-shrink: 0; opacity: 0.7; transition: opacity 0.15s ease; padding: 4px 8px; border-radius: 4px; }
.file-download-btn:hover { opacity: 1; background: rgba(88,101,242,0.3); }
.file-download-overlay {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.7); color: white;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 16px; opacity: 0;
  transition: opacity 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.file-preview:hover .file-download-overlay { opacity: 1; }
.file-download-overlay:hover { background: rgba(88,101,242,0.9); }
.file-preview-video, .file-preview-audio { display: flex; flex-direction: column; gap: 4px; }
.file-preview-actions { display: flex; gap: 6px; justify-content: flex-end; padding: 2px 0; }
.file-action-btn {
  background: var(--bg-secondary); color: var(--text-secondary);
  border: none; width: 30px; height: 30px;
  border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.file-action-btn:hover { background: var(--accent-primary); color: white; }
.file-warning {
  font-size: 12px; padding: 4px 8px; border-radius: 4px;
  margin-bottom: 4px; background: rgba(237,66,69,0.15);
  color: #ed4245; border-left: 3px solid #ed4245;
}
.file-warning-info { background: rgba(250,168,26,0.15); color: #faa81a; border-left-color: #faa81a; }
.file-dangerous { border: 1px solid rgba(237,66,69,0.4); border-radius: 8px; padding: 8px; background: rgba(237,66,69,0.05); }

/* ==================== INPUT LABEL & FIELD ==================== */
.input-label {
  display: block; color: var(--text-muted);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.input-field {
  width: 100%; background: var(--bg-tertiary);
  border: none; color: var(--text-primary);
  padding: 10px 12px; border-radius: 3px;
  font-size: 16px; outline: none;
  transition: box-shadow 0.15s ease;
}
.input-field:focus { box-shadow: 0 0 0 2px var(--accent-primary); }
textarea.input-field { resize: vertical; font-family: inherit; }

/* ==================== SETTINGS NAV MODERATOR ==================== */
.settings-nav-label {
  color: var(--text-muted); font-size: 11px;
  font-weight: 700; text-transform: uppercase;
  padding: 8px 10px 4px; letter-spacing: 0.02em;
}
.settings-nav-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 4px 10px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .thread-panel { width: 100%; }
  .quick-switcher { padding-top: 5vh; }
  .qs-container { width: 95vw; }
  .discover-grid { grid-template-columns: 1fr; }
}

/* ==================== MENTION AUTOCOMPLETE ==================== */
.mention-autocomplete {
  position: absolute; bottom: 100%; left: 0; right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px; max-height: 300px; overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.4);
  margin-bottom: 4px; padding: 4px;
}
.mention-autocomplete.hidden { display: none; }
.mention-ac-item {
  display: flex; align-items: center;
  padding: 8px 10px; border-radius: 4px;
  cursor: pointer; gap: 8px; font-size: 14px;
  color: var(--text-secondary);
  transition: background 0.08s ease, color 0.08s ease;
}
.mention-ac-item:hover, .mention-ac-item.active {
  background: rgba(88,101,242,0.2); color: var(--text-primary);
}
.mention-ac-avatar { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
.mention-ac-name { font-weight: 500; }
.mention-ac-special { color: var(--accent-primary); font-weight: 600; }
.mention-ac-desc { color: var(--text-muted); font-size: 12px; margin-left: auto; }

/* ==================== CHANNEL PERMISSIONS ==================== */
.channel-perms-modal { max-width: 600px; }
.perm-override-list { margin: 12px 0; }
.perm-override-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--bg-secondary);
  border-radius: 6px; margin-bottom: 6px;
}
.perm-override-name { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.perm-toggle-group { display: flex; gap: 4px; }
.perm-btn {
  width: 28px; height: 28px; border: none; border-radius: 4px;
  cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); color: var(--text-muted);
  transition: background 0.12s ease, color 0.12s ease;
}
.perm-btn.allow { background: rgba(35,165,90,0.15); color: var(--success); }
.perm-btn.deny { background: rgba(242,63,67,0.15); color: var(--danger); }
.perm-btn:hover { opacity: 0.8; }
.perm-section { margin-bottom: 16px; }
.perm-section-title { font-size: 12px; text-transform: uppercase; color: var(--text-muted); font-weight: 700; margin-bottom: 8px; letter-spacing: 0.04em; }
.perm-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border-color); }
.perm-row-name { font-size: 14px; color: var(--text-secondary); }
.perm-tri-toggle { display: flex; gap: 4px; }
.perm-tri-btn {
  width: 32px; height: 24px; border: none; border-radius: 4px;
  cursor: pointer; font-size: 11px;
  background: rgba(255,255,255,0.06); color: var(--text-muted);
  transition: background 0.12s ease, color 0.12s ease;
}
.perm-tri-btn.selected-allow { background: var(--success); color: white; }
.perm-tri-btn.selected-deny { background: var(--danger); color: white; }
.perm-tri-btn.selected-neutral { background: var(--text-muted); color: white; }

/* ==================== MEDYA GÖRÜNTÜLEYICI (LIGHTBOX) ==================== */
.media-viewer-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9); z-index: 10000;
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity 0.2s ease;
}
.media-viewer-overlay.active { opacity: 1; }
.media-viewer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; background: rgba(0,0,0,0.5); flex-shrink: 0;
}
.media-viewer-filename {
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%;
}
.media-viewer-actions { display: flex; gap: 8px; align-items: center; }
.media-viewer-btn {
  background: rgba(255,255,255,0.1); border: none;
  color: var(--text-secondary); width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s ease; text-decoration: none;
}
.media-viewer-btn:hover { background: rgba(255,255,255,0.2); color: white; }
.media-viewer-close:hover { background: rgba(237,66,69,0.6); }
.media-viewer-body {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow: auto; cursor: pointer;
}
.media-viewer-content { max-width: 95%; max-height: 90vh; border-radius: 4px; cursor: default; }
.media-viewer-image { object-fit: contain; box-shadow: 0 4px 20px rgba(0,0,0,0.5); user-select: none; }
.media-viewer-video { max-width: 90%; max-height: 85vh; background: #000; border-radius: 8px; }

@media (max-width: 768px) {
  .media-viewer-header { padding: 8px 12px; }
  .media-viewer-body { padding: 10px; }
  .media-viewer-content { max-width: 100%; }
  .media-viewer-video { max-width: 100%; }
  .file-download-overlay { opacity: 1; }
}

/* ==================== MODERASYON MODALLARI ==================== */
.mod-modal {
  background: var(--bg-secondary); border-radius: 12px;
  width: 90%; max-width: 480px;
  box-shadow: var(--shadow-large); overflow: hidden;
  animation: modModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modModalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.mod-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border-color);
}
.mod-modal-header h3 { margin: 0; font-size: 16px; color: #fff; }
.mod-header-ban { background: linear-gradient(135deg, rgba(242,63,67,0.1), transparent); }
.mod-header-timeout { background: linear-gradient(135deg, rgba(240,178,50,0.1), transparent); }
.mod-header-warn { background: linear-gradient(135deg, rgba(254,231,92,0.1), transparent); }
.mod-modal-close {
  background: none; border: none; color: var(--text-secondary);
  font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.mod-modal-close:hover { background: var(--bg-hover); color: #fff; }
.mod-modal-body { padding: 16px 20px; }
.mod-modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 20px; background: var(--bg-quaternary);
}
.mod-label {
  display: block; color: var(--text-muted);
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; margin-bottom: 6px; margin-top: 12px;
  letter-spacing: 0.04em;
}
.mod-label:first-child { margin-top: 0; }
.mod-textarea {
  width: 100%; background: var(--bg-tertiary);
  border: none; border-radius: 3px;
  color: var(--text-primary); padding: 10px;
  font-size: 14px; resize: vertical; font-family: inherit;
  transition: box-shadow 0.15s ease;
}
.mod-textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--accent-primary); }
.mod-warning-banner {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(237,66,69,0.1);
  border: 1px solid rgba(237,66,69,0.2);
  border-radius: 6px; padding: 10px 12px;
  color: #f0a0a2; font-size: 13px; margin-bottom: 8px;
}
.mod-warning-banner span:first-child { font-size: 20px; flex-shrink: 0; }
.mod-duration-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.mod-duration-btn {
  background: var(--bg-tertiary);
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 8px; color: var(--text-secondary);
  padding: 10px; font-size: 14px; font-weight: 500;
  cursor: pointer; transition: all 0.12s ease;
}
.mod-duration-btn:hover { border-color: var(--accent-primary); color: #fff; }
.mod-duration-btn.selected { border-color: var(--accent-primary); background: rgba(88,101,242,0.15); color: var(--accent-primary); }
.btn-warning { background: var(--warning); color: #000; border: none; padding: 8px 16px; border-radius: 4px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.12s ease; }
.btn-warning:hover { background: #d89e00; }
.btn-secondary { background: transparent; color: var(--text-secondary); border: none; padding: 8px 16px; border-radius: 4px; font-size: 14px; cursor: pointer; }
.btn-secondary:hover { color: #fff; text-decoration: underline; }
.btn-warn { background: rgba(250,168,26,0.15); color: #faa81a; border: 1px solid rgba(250,168,26,0.2); padding: 2px 8px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: background 0.12s ease; }
.btn-warn:hover { background: rgba(250,168,26,0.3); }
.btn-timeout { background: rgba(254,231,92,0.1); color: #fee75c; border: 1px solid rgba(254,231,92,0.2); padding: 2px 8px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: background 0.12s ease; }
.btn-timeout:hover { background: rgba(254,231,92,0.25); }
.btn-ban { background: rgba(237,66,69,0.15); color: #ed4245; border: 1px solid rgba(237,66,69,0.2); padding: 2px 8px; border-radius: 4px; font-size: 12px; cursor: pointer; transition: background 0.12s ease; }
.btn-ban:hover { background: rgba(237,66,69,0.3); }
.up-mod-actions {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.btn-mod { border: none; padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.12s ease; }
.btn-mod-warn { background: rgba(250,168,26,0.15); color: #faa81a; }
.btn-mod-warn:hover { background: rgba(250,168,26,0.3); }
.btn-mod-kick { background: rgba(254,231,92,0.1); color: #fee75c; }
.btn-mod-kick:hover { background: rgba(254,231,92,0.25); }
.btn-mod-timeout { background: rgba(88,101,242,0.15); color: #5865f2; }
.btn-mod-timeout:hover { background: rgba(88,101,242,0.3); }
.btn-mod-ban { background: rgba(237,66,69,0.15); color: #ed4245; }
.btn-mod-ban:hover { background: rgba(237,66,69,0.3); }
.btn-mod-warnings { background: rgba(185,187,190,0.1); color: #b9bbbe; }
.btn-mod-warnings:hover { background: rgba(185,187,190,0.2); }
.warn-item { background: var(--bg-primary); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; border-left: 3px solid #faa81a; }
.warn-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.warn-item-mod { color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.warn-item-date { color: var(--text-muted); font-size: 11px; }
.warn-item-reason { color: var(--text-secondary); font-size: 14px; margin-bottom: 6px; word-break: break-word; }

@media (max-width: 768px) {
  .mod-modal { width: 95%; max-width: none; }
  .mod-duration-grid { grid-template-columns: repeat(2, 1fr); }
  .up-mod-actions { justify-content: center; }
  .context-menu { min-width: 200px; }
}

/* ==================== KATEGORİ YÖNETİMİ ==================== */
.settings-category-item { background: var(--bg-secondary); border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.settings-category-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: var(--bg-quaternary);
}
.settings-category-info { display: flex; align-items: center; gap: 8px; }
.settings-category-icon { font-size: 18px; }
.settings-category-name { color: #fff; font-weight: 600; font-size: 14px; }
.settings-category-count { color: var(--text-muted); font-size: 12px; }
.settings-category-actions { display: flex; gap: 6px; }
.settings-category-channels { padding: 6px 10px; }
.settings-cat-channel {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 8px; color: var(--text-secondary); font-size: 13px;
  border-radius: 4px;
}
.settings-cat-channel:hover { background: var(--bg-hover); }
.btn-tiny { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; padding: 2px 6px; border-radius: 4px; }
.btn-tiny:hover { color: #ed4245; background: rgba(237,66,69,0.1); }
.settings-category-empty { padding: 8px 12px; color: var(--text-muted); font-size: 12px; font-style: italic; }
.ch-cat-select {
  background: var(--bg-tertiary); color: var(--text-secondary);
  border: 1px solid var(--border-color); border-radius: 4px;
  padding: 2px 6px; font-size: 11px; max-width: 100px; cursor: pointer;
}
.ch-cat-select:focus { border-color: var(--accent-primary); outline: none; }
.settings-channel-category { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ==================== KULLANICI AYARLARI (Discord tarzı) ==================== */
.user-settings-container {
  display: flex; width: 100%; height: 100vh; max-height: 100vh;
  background: var(--bg-secondary);
}
.user-settings-sidebar {
  width: 220px; min-width: 220px;
  background: var(--bg-tertiary);
  padding: 60px 8px 20px; overflow-y: auto;
}
.user-settings-content {
  flex: 1; padding: 60px 40px 40px; overflow-y: auto; position: relative;
}
.user-settings-content h2 { color: var(--text-primary); font-size: 20px; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.02em; }
.user-settings-close {
  position: absolute; top: 16px; right: 16px;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-color);
  color: var(--text-muted); width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.12s ease, border-color 0.12s ease;
}
.user-settings-close:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.15); }

#profile-settings-modal .modal-content,
#profile-settings-modal.modal {
  max-width: 100%; width: 100%; height: 100%;
  border-radius: 0; padding: 0; margin: 0;
}
#profile-settings-modal { z-index: 9999; }

.us-account-card { background: var(--bg-tertiary); border-radius: 8px; overflow: hidden; max-width: 600px; }
.us-account-info { display: flex; align-items: center; gap: 16px; padding: 0 16px; margin-top: -30px; }
.us-big-avatar { width: 72px; height: 72px; border-radius: 50%; border: 4px solid var(--bg-tertiary); object-fit: cover; }
.us-account-fields { padding: 16px; }
.us-field {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; background: var(--bg-secondary);
  border-radius: 4px; margin-bottom: 4px;
}
.us-field-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; width: 120px; flex-shrink: 0; }
.us-field-value { flex: 1; color: var(--text-primary); font-size: 14px; }
.us-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; margin: 12px 0 4px; }
.us-input {
  width: 100%; padding: 8px 12px; border-radius: 3px;
  background: var(--bg-primary); color: var(--text-primary);
  border: none; font-size: 14px;
  transition: box-shadow 0.15s ease;
}
.us-input:focus { box-shadow: 0 0 0 2px var(--accent-primary); outline: none; }
.us-profile-preview { background: var(--bg-tertiary); border-radius: 8px; overflow: hidden; }
.us-preview-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin: -24px 0 0 12px; border: 3px solid var(--bg-tertiary); }

@media (max-width: 768px) {
  .user-settings-container { flex-direction: column; }
  .user-settings-sidebar { width: 100%; min-width: 100%; padding: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
  .user-settings-sidebar .settings-nav-label,
  .user-settings-sidebar .settings-nav-divider { display: none; }
  .user-settings-sidebar .settings-nav-item { padding: 6px 12px; font-size: 12px; }
  .user-settings-content { padding: 20px 16px; }
}

/* ==================== SESLİ SOHBET SES AYARI ==================== */
.voice-volume-slider {
  -webkit-appearance: none; appearance: none;
  height: 6px; border-radius: 3px;
  background: var(--bg-primary); outline: none; cursor: pointer;
}
.voice-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-primary); cursor: pointer;
}
.voice-volume-slider::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent-primary); cursor: pointer; border: none;
}
.context-menu-label {
  font-size: 11px; color: var(--text-muted);
  text-transform: uppercase; padding: 4px 12px; user-select: none;
}

/* ==================== STICKER PICKER ==================== */
.sticker-picker {
  width: 350px; max-height: 400px;
  background: var(--bg-secondary); border-radius: 8px;
  box-shadow: var(--shadow-large);
  display: flex; flex-direction: column; overflow: hidden;
}
.sticker-picker-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--border-color); gap: 8px;
}
.sticker-picker-close {
  background: none; border: none; color: var(--text-muted);
  font-size: 16px; cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.sticker-picker-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.sticker-server-tabs {
  display: flex; gap: 4px; padding: 6px 8px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto; flex-shrink: 0;
}
.sticker-server-tab {
  cursor: pointer; padding: 3px; border-radius: 8px;
  opacity: 0.5; transition: opacity 0.12s ease, background 0.12s ease;
}
.sticker-server-tab:hover { opacity: 0.8; background: var(--bg-hover); }
.sticker-server-tab.active { opacity: 1; background: var(--bg-active); }
.sticker-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px; padding: 8px; overflow-y: auto; flex: 1;
}
.sticker-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 6px; border-radius: 8px; cursor: pointer;
  transition: background 0.12s ease;
}
.sticker-item:hover { background: var(--bg-hover); }
.sticker-item img { width: 64px; height: 64px; object-fit: contain; border-radius: 4px; }
.sticker-item span {
  font-size: 10px; color: var(--text-muted); margin-top: 4px;
  text-align: center; max-width: 70px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sticker-message { display: inline-block; margin: 4px 0; }
.sticker-img {
  width: 128px; height: 128px; object-fit: contain;
  border-radius: 4px; cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0, 1);
}
.sticker-img:hover { transform: scale(1.05); }

/* ==================== SERVER SETTINGS UPLOAD ==================== */
.ss-upload-area { display: flex; align-items: center; gap: 12px; }
.ss-icon-preview { flex-shrink: 0; }
.ss-banner-area { display: flex; flex-direction: column; }
.ss-banner-preview { min-height: 100px; border-radius: 8px; overflow: hidden; }

/* ==================== RESPONSIVE SERVER SETTINGS ==================== */
@media (max-width: 768px) {
  .server-settings-overlay { z-index: 500; flex-direction: column; }
  .server-settings-layout { flex-direction: column; height: 100%; }
  .settings-sidebar {
    width: 100%; flex-shrink: 0; max-height: 50px;
    overflow: hidden; transition: max-height 0.3s ease;
    cursor: pointer; position: relative;
  }
  .settings-sidebar::after {
    content: '\25BC'; position: absolute; right: 16px; top: 16px;
    font-size: 12px; color: var(--text-muted); transition: transform 0.3s ease;
  }
  .settings-sidebar.expanded::after { transform: rotate(180deg); }
  .settings-sidebar.expanded { max-height: 60vh; overflow-y: auto; }
  .settings-tab-content { padding: 12px; flex: 1; overflow-y: auto; }
  .permissions-grid { grid-template-columns: 1fr; }
  .settings-close-btn { position: fixed !important; top: 8px; right: 8px; z-index: 501; font-size: 28px; }
  .modal-overlay { z-index: 600; }
  .modal { z-index: 601; width: 95vw !important; max-width: 95vw !important; max-height: 90vh !important; }
  .channel-perms-modal { max-width: 95vw !important; }
}

/* ==================== KEYBINDS & SHORTCUTS ==================== */
.keybinds-table {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 600px;
}

.keybind-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary, #2f3136);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  gap: 16px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.keybind-row:hover {
  background: var(--bg-hover, #35373c);
  border-color: rgba(255, 255, 255, 0.1);
}

.keybind-info {
  flex: 1;
}

.keybind-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary, #ffffff);
  margin-bottom: 2px;
}

.keybind-desc {
  font-size: 12px;
  color: var(--text-muted, #949ba4);
}

.keybind-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.keybind-badge-box {
  background: var(--bg-tertiary, #202225);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 6px 14px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-primary, #5865f2);
  min-width: 90px;
  text-align: center;
  user-select: none;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.3);
  transition: all 0.15s ease;
}

.keybind-badge-box.recording {
  background: var(--danger, #ed4245) !important;
  color: white !important;
  border-color: var(--danger, #ed4245) !important;
  animation: keybindPulse 0.8s infinite alternate ease-in-out;
}

@keyframes keybindPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(237, 66, 69, 0.4); }
  100% { transform: scale(1.05); box-shadow: 0 0 12px rgba(237, 66, 69, 0.8); }
}

.keybinds-desktop-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.keybinds-desktop-banner .kdb-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.keybinds-desktop-banner .kdb-content {
  flex: 1;
}

.keybinds-desktop-banner .kdb-content h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.keybinds-desktop-banner .kdb-content p {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted, #949ba4);
  line-height: 1.45;
}

.keybinds-desktop-banner .kdb-content strong {
  color: #c7d2fe;
}

.keybinds-desktop-banner .kdb-btn {
  flex-shrink: 0;
  text-decoration: none;
  white-space: nowrap;
  padding: 8px 14px;
  font-size: 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff !important;
}

@media (max-width: 600px) {
  .keybinds-desktop-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .keybinds-desktop-banner .kdb-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==================== SPEAKING PULSE ANIMATION ==================== */
@keyframes speakingGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    border-color: #22c55e;
  }
  60% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
    border-color: #22c55e;
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    border-color: #22c55e;
  }
}

.voice-user.speaking .voice-avatar,
.participant-video.speaking video,
.participant-video.speaking .avatar-large,
.voice-user.speaking img {
  animation: speakingGlow 1.4s infinite !important;
  border: 2px solid #22c55e !important;
}

/* ==================== HIZLI MİNİ PROFİL POPOVER ==================== */
.mini-profile-popover {
  position: fixed;
  z-index: 9999;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-glass);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.08);
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: popoverFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top left;
}

@keyframes popoverFadeIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.mini-profile-popover.hidden {
  display: none !important;
}

.mpp-banner {
  height: 84px;
  background: linear-gradient(135deg, #5865f2 0%, #7c3aed 100%);
  background-size: cover;
  background-position: center;
  position: relative;
}

.mpp-body {
  padding: 0 16px 16px;
  position: relative;
  background: linear-gradient(180deg, rgba(22, 25, 36, 0.95) 0%, rgba(14, 16, 23, 0.98) 100%);
}

.mpp-avatar-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: -38px;
  margin-bottom: 12px;
}

.mpp-avatar-wrap {
  position: relative;
  display: inline-block;
}

.mpp-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 5px solid var(--bg-card);
  background: var(--bg-tertiary);
  object-fit: cover;
  display: block;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mpp-avatar-wrap .status-dot {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  border: 3px solid var(--bg-card);
  border-radius: 50%;
}

.mpp-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 28px;
  align-items: center;
}

.mpp-badge-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  cursor: default;
  transition: transform 0.15s ease;
}

.mpp-badge-pill:hover {
  transform: scale(1.15);
}

.mpp-user-meta {
  margin-bottom: 10px;
}

.mpp-username-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.mpp-username {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.mpp-pronouns {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.mpp-custom-status {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  word-break: break-word;
}

.mpp-divider {
  height: 1px;
  background: var(--border-color);
  margin: 10px 0;
}

.mpp-section {
  margin-bottom: 10px;
}

.mpp-section-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.mpp-bio-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  word-break: break-word;
  max-height: 90px;
  overflow-y: auto;
}

.mpp-dates-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 11px;
}

.mpp-sublabel {
  color: var(--text-muted);
  font-weight: 600;
}

.mpp-date-val {
  color: var(--text-secondary);
  margin-left: 4px;
}

.mpp-roles-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 60px;
  overflow-y: auto;
}

.mpp-role-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mpp-volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 10px;
  border-radius: 8px;
}

.mpp-volume-row input[type=range] {
  flex: 1;
  accent-color: var(--brand-color);
  cursor: pointer;
}

.mpp-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.mpp-actions button {
  flex: 1;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==================== ÖZEL DURUM MODALI ==================== */
.custom-status-dialog {
  width: 440px;
  max-width: calc(100vw - 32px);
  border-radius: var(--border-radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-large);
}

.cs-emoji-selector-btn {
  width: 44px;
  height: 44px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.cs-emoji-selector-btn:hover {
  background: var(--bg-hover);
}

.cs-emoji-palette {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.cs-emoji-palette span {
  font-size: 20px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}

.cs-emoji-palette span:hover {
  transform: scale(1.25);
  background: var(--bg-hover);
}

.status-preset-chip {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.status-preset-chip:hover {
  background: var(--brand-color);
  color: #fff;
  border-color: var(--brand-color);
  transform: translateY(-1px);
}

/* ==================== MOBİL ALT GEZİNME (Bottom Navigation) ==================== */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-glass);
    z-index: 900;
    align-items: center;
    justify-content: space-around;
  }

  .mb-nav-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 12px;
    cursor: pointer;
    flex: 1;
    min-height: 48px;
    transition: color 0.15s ease;
  }

  .mb-nav-item .mb-icon {
    font-size: 20px;
  }

  .mb-nav-item .mb-label {
    font-size: 10px;
    font-weight: 600;
  }

  .mb-nav-item.active {
    color: var(--brand-color);
  }

  /* Ana içerik alanını alt menü ve safe-area için boşluk bırakacak şekilde ayarla */
  #main {
    padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  }

  /* Mobil ekran paylaşım sahnesi 100% genişlik & dokunmatik kontroller */
  .ss-grid,
  .screen-share-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  .ss-slot {
    border-radius: 0 !important;
    margin-bottom: 6px;
  }

  .ss-slot-stage {
    aspect-ratio: 16 / 9;
    max-height: 52vh !important;
  }

  .ss-slot-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 16px !important;
  }

  /* Mini profil mobil görünümünde ekranın ortasına/altına sabitlenir */
  .mini-profile-popover {
    left: 50% !important;
    top: auto !important;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    transform: translateX(-50%) !important;
    width: calc(100vw - 24px) !important;
    max-width: 380px !important;
    border-radius: 18px !important;
  }
}

/* ==================== MOBİL WEBRTC UNBLOCK OVERLAY ==================== */
.stream-unblock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 13, 0.88);
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 20px;
  text-align: center;
  animation: fadeIn 0.2s ease;
}

.stream-unblock-overlay.hidden {
  display: none !important;
}

.su-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 320px;
}

.su-play-btn {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--brand-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 0 24px rgba(88, 101, 242, 0.6);
  animation: playBtnPulse 1.8s infinite;
}

@keyframes playBtnPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(88, 101, 242, 0.7); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 16px rgba(88, 101, 242, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(88, 101, 242, 0); }
}

.su-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.su-sub {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ==================== YÜZEN MİNİ YAYIN OYNATICI ==================== */
.floating-stream-player {
  position: fixed;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  width: 220px;
  aspect-ratio: 16 / 10;
  background: #000;
  border-radius: 12px;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-large);
  z-index: 850;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.floating-stream-player:hover {
  transform: scale(1.03);
}

.floating-stream-player.hidden {
  display: none !important;
}

.fsp-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 4px 8px;
  background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.fsp-live-badge {
  background: #ef4444;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
}

.fsp-name {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.fsp-close-btn {
  background: transparent;
  border: none;
  color: #ccc;
  font-size: 12px;
  cursor: pointer;
}

/* ==================== SOUNDBOARD STYLES ==================== */
.soundboard-dialog {
  width: 480px;
  max-width: calc(100vw - 32px);
  border-radius: var(--border-radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
}

.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  padding: 4px;
}

.sound-tile {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  text-align: center;
}

.sound-tile:hover {
  background: var(--bg-hover);
  border-color: var(--brand-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(88, 101, 242, 0.25);
}

.sound-tile-emoji {
  font-size: 28px;
  line-height: 1;
}

.sound-tile-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.sound-tile-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  display: none;
}

.sound-tile:hover .sound-tile-delete {
  display: block;
}

/* ==================== AI SOHBET ÖZETİ (TL;DR) ==================== */
.ai-summary-dialog {
  width: 580px;
  max-width: calc(100vw - 32px);
  border-radius: var(--border-radius-lg);
  background: linear-gradient(180deg, rgba(20, 24, 38, 0.96) 0%, rgba(12, 14, 22, 0.98) 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(139, 92, 246, 0.2);
  backdrop-filter: blur(24px);
}

.ai-summary-header {
  padding: 16px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-sparkle-badge {
  background: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 4px;
}

.ai-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 36px 16px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

.ai-pulse-orb {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.6);
  animation: orbPulse 1.5s infinite alternate;
}

@keyframes orbPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  100% { transform: scale(1.15); opacity: 1; box-shadow: 0 0 35px rgba(6, 182, 212, 0.8); }
}

.ai-synthesis-card {
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 10px;
  padding: 14px;
  font-size: 13.5px;
  color: #e2e8f0;
  line-height: 1.5;
  margin-bottom: 14px;
}

.ai-topics-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.ai-topic-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  white-space: pre-line;
}

/* ==================== RANK & LEADERBOARD ==================== */
.rank-card-dialog {
  width: 480px;
  max-width: calc(100vw - 32px);
  background: transparent;
  border: none;
  box-shadow: none;
}

.rank-card {
  background: linear-gradient(135deg, #141824 0%, #0c0e16 100%);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-large);
  position: relative;
  overflow: hidden;
}

.rank-card-body {
  display: flex;
  gap: 16px;
  align-items: center;
}

.rc-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.rc-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--brand-color);
  object-fit: cover;
}

.rc-level-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  background: var(--brand-gradient);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
  border: 2px solid #0c0e16;
}

.rc-info {
  flex: 1;
  min-width: 0;
}

.rc-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.rc-username {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.rc-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.rc-rank-wrap {
  text-align: right;
}

.rc-rank-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

.rc-rank-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--brand-color);
  margin-left: 4px;
}

.rc-xp-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.rc-bar-track {
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.rc-bar-fill {
  height: 100%;
  background: var(--brand-gradient);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.leaderboard-dialog {
  width: 480px;
  max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border-radius: var(--border-radius-lg);
  border: 1px solid var(--border-glass);
}

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
}

.lb-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.lb-item:hover {
  background: var(--bg-hover);
}

.lb-rank {
  font-size: 15px;
  font-weight: 800;
  width: 28px;
  text-align: center;
}

.lb-rank.gold { color: #f59e0b; }
.lb-rank.silver { color: #cbd5e1; }
.lb-rank.bronze { color: #d97706; }

.lb-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.lb-info {
  flex: 1;
  min-width: 0;
}

.lb-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-stats {
  font-size: 11px;
  color: var(--text-muted);
}

.lb-level-badge {
  background: rgba(88, 101, 242, 0.15);
  color: var(--brand-color);
  border: 1px solid rgba(88, 101, 242, 0.3);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
}

/* ==================== ÖZEL EMOJİLER ==================== */
.custom-emoji {
  width: 22px;
  height: 22px;
  vertical-align: -4px;
  object-fit: contain;
  display: inline-block;
  margin: 0 2px;
}

/* ==================== ANKETLER (POLLS) ==================== */
.poll-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 14px;
  margin-top: 8px;
  max-width: 480px;
}

.poll-question {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.poll-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poll-option-row {
  position: relative;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.poll-option-row:hover {
  border-color: var(--brand-color);
}

.poll-option-row.voted {
  border-color: var(--brand-color);
  background: rgba(99, 102, 241, 0.1);
}

.poll-bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.25));
  z-index: 0;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 6px;
}

.poll-opt-text {
  position: relative;
  z-index: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.poll-opt-stats {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

.poll-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
}

/* ==================== SABİTLENEN MESAJLAR ==================== */
.pinned-messages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pinned-msg-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  gap: 12px;
  position: relative;
  transition: border-color 0.15s ease;
}

.pinned-msg-item:hover {
  border-color: var(--brand-color);
}

.pinned-msg-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.pinned-msg-content {
  flex: 1;
  min-width: 0;
}

.pinned-msg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.pinned-msg-author {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.pinned-msg-time {
  font-size: 11px;
  color: var(--text-muted);
}

.pinned-msg-text {
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-word;
}

.pinned-msg-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

/* ==================== ÇİZ & TAHMİN ET (DRAW & GUESS / GARTIC) ==================== */
.draw-game-dialog {
  width: 920px;
  max-width: calc(100vw - 24px);
  padding: 0;
  background: #0f121c;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.draw-word-badge {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 2px;
}

.draw-game-dialog {
  width: 960px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0f121d;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
}

.draw-round-badge {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.draw-word-badge {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.draw-timer-badge {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.draw-timer-badge.urgent {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
  animation: pulseUrgent 0.8s infinite;
}

@keyframes pulseUrgent {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  50% { transform: scale(1.08); box-shadow: 0 0 12px rgba(239,68,68,0.8); }
}

.draw-game-layout {
  display: flex;
  height: 520px;
}

@media (max-width: 820px) {
  .draw-game-layout {
    flex-direction: column;
    height: auto;
  }
}

.draw-stage {
  flex: 1;
  background: #151824;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  min-width: 0;
}

.draw-canvas-container {
  position: relative;
  width: 100%;
  max-width: 680px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#draw-canvas {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  cursor: crosshair;
  width: 100%;
  max-width: 680px;
  height: auto;
  aspect-ratio: 800 / 500;
  touch-action: none;
}

/* Overlays (Word Choice & Round End) */
.draw-overlay-modal {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(11, 14, 23, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px;
  transition: opacity 0.2s ease;
}

.draw-overlay-modal.hidden {
  display: none !important;
}

.draw-overlay-card {
  background: rgba(22, 27, 44, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
}

.draw-overlay-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 6px;
}

.draw-overlay-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.draw-choices-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.draw-choice-btn {
  flex: 1;
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(99, 102, 241, 0.35));
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.draw-choice-btn:hover {
  transform: translateY(-2px);
  background: var(--brand-color);
  box-shadow: 0 6px 16px rgba(88, 101, 242, 0.4);
}

.draw-revealed-word-box {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  padding: 14px;
  border-radius: 12px;
  margin: 12px 0;
}

.draw-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 680px;
  margin-top: 10px;
  background: rgba(11, 13, 19, 0.85);
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 10px;
}

.draw-colors {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.draw-color-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.draw-color-btn.active, .draw-color-btn:hover {
  transform: scale(1.25);
  border-color: #ffffff;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

.draw-sizes {
  display: flex;
  gap: 4px;
}

.draw-size-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.draw-size-btn.active {
  background: var(--brand-color);
  color: #fff;
  border-color: var(--brand-color);
}

.draw-tools {
  display: flex;
  gap: 6px;
}

.draw-tool-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}

.draw-tool-btn.active {
  background: var(--brand-color);
  border-color: var(--brand-color);
}

.draw-sidebar {
  width: 290px;
  display: flex;
  flex-direction: column;
  background: #0f121d;
}

.draw-scoreboard {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  max-height: 160px;
  overflow-y: auto;
}

.draw-sidebar-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.draw-score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 5px 8px;
  color: #e2e8f0;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  margin-bottom: 4px;
}

.draw-score-item.is-drawer {
  border-left: 3px solid var(--brand-color);
  background: rgba(88,101,242,0.1);
}

.draw-score-item span.score {
  font-weight: 800;
  color: #22c55e;
}

.draw-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
  min-height: 0;
}

.draw-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  padding-bottom: 8px;
}

.draw-chat-msg {
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  word-break: break-word;
}

.draw-chat-msg.correct {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
  font-weight: 700;
  border: 1px solid rgba(34, 197, 94, 0.4);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.draw-chat-msg.drawer-msg {
  color: var(--text-muted);
  font-style: italic;
}

.draw-chat-input-row {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.draw-chat-input-row input {
  flex: 1;
  background: #181c2b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #fff;
  padding: 8px 10px;
  font-size: 12px;
  outline: none;
}

.draw-chat-input-row input:focus {
  border-color: var(--brand-color);
}

/* ==================== WEB IN-GAME OVERLAY HUD ==================== */
.web-ingame-overlay {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
  background: rgba(11, 13, 19, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px;
  width: 220px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
}

.wio-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 8px;
}

.wio-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.wio-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 10px;
}

.wio-user-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wio-user-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
  color: #e2e8f0;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.wio-user-item.speaking {
  border-color: #22c55e !important;
  background: rgba(34, 197, 94, 0.2) !important;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35) !important;
  transform: translateX(3px);
}

.wio-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wio-user-item.speaking .wio-avatar {
  border-color: #22c55e !important;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8) !important;
}

/* ==================== RICH PRESENCE / GAME BADGE ==================== */
.game-activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #c4b5fd;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

/* ==================== EKRAN SEÇİCİ (SCREEN PICKER) & YAYIN AYARLARI ==================== */
.sp-tabs {
  display: flex;
  gap: 8px;
}

.sp-tab-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.sp-tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.sp-tab-btn.active {
  background: var(--brand-color);
  color: #fff;
  border-color: var(--brand-color);
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.screen-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}

.sp-card {
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.sp-card:hover {
  border-color: var(--brand-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.25);
}

.sp-card.selected {
  border-color: #22c55e;
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.05);
}

.sp-card.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 6px;
  background: #22c55e;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.sp-thumb-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.sp-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sp-app-icon {
  position: absolute;
  bottom: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(0,0,0,0.6);
  padding: 2px;
  object-fit: contain;
}

.sp-title {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--bg-card);
}

/* Yayın Kalite & Ayar Çubuğu */
.sp-settings-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.sp-setting-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sp-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.sp-pills {
  display: flex;
  gap: 6px;
  background: var(--bg-secondary);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.sp-pill {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.sp-pill:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.sp-pill.active {
  background: var(--brand-color);
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.sp-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sp-audio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.sp-audio-label input[type="checkbox"] {
  accent-color: var(--brand-color);
  width: 16px;
  height: 16px;
}

.sp-selected-info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== OYUN İÇİ WEB OVERLAY HUD WIDGETI ==================== */
.web-ingame-overlay {
  position: fixed;
  top: 40px;
  left: 40px;
  z-index: 99999;
  background: rgba(11, 13, 19, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 220px;
  max-width: 280px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.2);
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

.wio-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 6px;
}

.wio-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.wio-close-btn {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10px;
}

.wio-close-btn:hover {
  color: #ef4444;
}

.wio-users-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wio-user-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.15s;
  border: 1px solid transparent;
}

.wio-user-item.speaking {
  border-color: rgba(34, 197, 94, 0.6);
  background: rgba(34, 197, 94, 0.15);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.wio-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.wio-username {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== RICH PRESENCE GAME ACTIVITY BADGE ==================== */
.game-activity-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  padding: 2px 6px;
  margin-top: 3px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: pulseGlow 3s infinite;
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 4px rgba(56, 189, 248, 0.2); }
  50% { box-shadow: 0 0 10px rgba(56, 189, 248, 0.4); }
}

/* ==================== OTOMATİK GÜNCELLEME BANNERI ==================== */
.app-update-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(15, 23, 42, 0.95));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(99, 102, 241, 0.3);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
  animation: slideInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.aub-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.aub-icon {
  font-size: 24px;
  background: rgba(99, 102, 241, 0.2);
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.aub-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.aub-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
}

.aub-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

@keyframes slideInUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ==================== OYUN İÇİ OVERLAY AYARLARI SİSTEMİ ==================== */
.overlay-setting-card {
  background: linear-gradient(135deg, rgba(88, 101, 242, 0.12), rgba(15, 23, 42, 0.6));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.osc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.osc-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.osc-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.osc-shortcut-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--text-secondary);
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #94a3b8;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #22c55e;
  border-color: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.4);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(22px);
  background-color: #ffffff;
}

/* Grid Layout */
.overlay-settings-grid-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 860px) {
  .overlay-settings-grid-layout {
    grid-template-columns: 1fr;
  }
}

.os-controls-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.osc-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.osc-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.os-value-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-color);
  background: rgba(88, 101, 242, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
}

.os-range-slider {
  width: 100%;
  accent-color: var(--brand-color);
  height: 6px;
  border-radius: 3px;
  cursor: pointer;
}

.os-presets-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-preset-chip {
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-preset-chip:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-preset-chip.active {
  background: rgba(88, 101, 242, 0.2);
  border-color: var(--brand-color);
  color: #c4b5fd;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.25);
}

/* 4-Corner Position Selector Grid */
.os-position-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.os-pos-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.os-pos-btn .pos-icon {
  font-size: 14px;
}

.os-pos-btn:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.os-pos-btn.active {
  background: rgba(88, 101, 242, 0.25);
  border-color: var(--brand-color);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Options list */
.osc-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.osc-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: background 0.15s;
}

.osc-checkbox-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.osc-checkbox-row input[type="checkbox"] {
  accent-color: var(--brand-color);
  width: 16px;
  height: 16px;
  margin-top: 2px;
  cursor: pointer;
}

.osc-opt-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.osc-opt-text strong {
  font-size: 13px;
  color: var(--text-primary);
}

.osc-opt-text span {
  font-size: 11px;
  color: var(--text-muted);
}

/* Canlı Önizleme Alanı */
.os-preview-column {
  position: sticky;
  top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-preview-test {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-preview-test:hover {
  background: rgba(34, 197, 94, 0.25);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.os-live-screen-stage {
  position: relative;
  width: 100%;
  height: 320px;
  background: radial-gradient(circle at center, #1e1b4b 0%, #090a0f 80%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 8px 24px rgba(0,0,0,0.5);
}

.os-mock-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  pointer-events: none;
  opacity: 0.3;
}

.os-mock-crosshair:before, .os-mock-crosshair:after {
  content: '';
  position: absolute;
  background: #22c55e;
}

.os-mock-crosshair:before {
  top: 5px;
  left: 0;
  width: 12px;
  height: 2px;
}

.os-mock-crosshair:after {
  top: 0;
  left: 5px;
  width: 2px;
  height: 12px;
}

.os-mock-game-hud {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 1.5px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.25);
  pointer-events: none;
}

/* Simüle Edilen Overlay HUD Kutusu */
.os-preview-hud-box {
  position: absolute;
  display: inline-flex;
  flex-direction: column;
  gap: 5px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  max-width: 200px;
}

.os-preview-hud-box.pos-top-left {
  top: 14px;
  left: 14px;
  transform-origin: top left;
  align-items: flex-start;
}

.os-preview-hud-box.pos-top-right {
  top: 14px;
  right: 14px;
  transform-origin: top right;
  align-items: flex-end;
}

.os-preview-hud-box.pos-bottom-left {
  bottom: 14px;
  left: 14px;
  transform-origin: bottom left;
  align-items: flex-start;
}

.os-preview-hud-box.pos-bottom-right {
  bottom: 14px;
  right: 14px;
  transform-origin: bottom right;
  align-items: flex-end;
}

.os-preview-header {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(11, 13, 19, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 3px 8px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
}

.os-preview-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.os-preview-users {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.os-prev-user-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 18, 28, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px 8px;
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: all 0.15s;
}

.os-prev-user-item.speaking {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(15, 32, 22, 0.95);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.45);
  transform: scale(1.03);
}

.os-prev-avatar {
  border-radius: 50%;
  object-fit: cover;
  background: #1e293b;
  border: 1.5px solid transparent;
  transition: border-color 0.15s;
  flex-shrink: 0;
}

.os-prev-user-item.speaking .os-prev-avatar {
  border-color: #22c55e;
}

.os-prev-username {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
  font-size: 11px;
}

/* Kompakt Mod (Sadece Avatar) Önizlemesi */
.os-preview-hud-box.hide-names .os-prev-user-item {
  padding: 2px;
  border-radius: 50%;
}

.os-preview-hud-box.hide-names .os-prev-username {
  display: none !important;
}

.os-preview-hud-box.hide-names .os-preview-users {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
}

/* ==================== GÜNCELLEME MERKEZİ & SÜRÜM STİLLERİ ==================== */
.update-center-card {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.4), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.ucc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ucc-app-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ucc-app-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(124, 58, 237, 0.25));
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.25);
}

.ucc-app-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.ucc-version-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-color);
  margin-top: 2px;
}

/* Status Box */
.ucc-status-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px 16px;
}

.ucc-status-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}

.ucc-status-icon.spin {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.ucc-status-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ucc-status-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.ucc-status-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Progress bar */
.ucc-progress-container {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ucc-progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ucc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #22c55e);
  border-radius: 4px;
  transition: width 0.2s ease;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.ucc-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ucc-actions-row {
  margin-top: 12px;
}

.ucc-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

.ucc-last-check-text strong {
  color: var(--text-secondary);
}

/* Changelog */
.changelog-container {
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
}

.changelog-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.changelog-item {
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.changelog-item.current {
  border-color: rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.08);
}

.changelog-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.changelog-ver {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.changelog-tag {
  font-size: 10px;
  font-weight: 700;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.changelog-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.changelog-notes {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.changelog-notes strong {
  color: var(--text-primary);
}








