/* Butonlar */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-weight: 500;
  font-size: var(--font-size-sm);
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--accent-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-secondary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 4px 10px;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Input Alanları */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}

.input-wrapper .input {
  padding-left: 36px;
}

.input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--font-size-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(91, 94, 166, 0.1);
}

/* Sekmeler (Tab Bar) */
.tab-bar {
  display: flex;
  background: var(--bg-tertiary);
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  border-bottom: 1px solid var(--border-color);
}

.tab-bar::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
}

.tab:hover {
  background: rgba(0, 0, 0, 0.02);
  color: var(--text-primary);
}

.tab.active {
  color: var(--accent-primary);
  font-weight: 600;
  border-bottom-color: var(--accent-primary);
  background: var(--bg-secondary);
}

.tab.unread {
  position: relative;
}

.tab.unread::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: var(--danger);
  border-radius: var(--radius-full);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.tab-close {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: 10px;
  opacity: 0.5;
}

.tab-close:hover {
  background: rgba(0, 0, 0, 0.1);
  opacity: 1;
}

/* Modal Stilleri */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: var(--glass-blur);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 1;
  transition: opacity var(--transition-fast);
}
.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal {
  background: var(--bg-secondary);
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transform: scale(1);
  transition: transform var(--transition-fast);
}

.modal-lg {
  max-width: 900px;
}

.modal-overlay.hidden .modal {
  transform: scale(0.95);
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.modal-body {
  padding: 20px;
}

.media-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
  margin-top: 4px;
}
.media-link:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
}
.media-external-link {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 4px;
}
.media-external-link:hover {
  color: var(--accent-primary);
}
.url-text {
  font-size: 0.85em;
  color: var(--text-muted);
  word-break: break-all;
}

.gif-preview {
  max-width: 250px;
  max-height: 250px;
  border-radius: var(--radius-sm);
  display: block;
  margin-top: 5px;
  cursor: pointer;
  border: 1px solid var(--border-light);
  transition: opacity 0.2s;
}
.gif-preview:hover {
  opacity: 0.8;
}

/* Nick Önerileri */
.nick-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 8px 16px;
  border-top: 1px solid var(--border-color);
  max-height: 120px;
  overflow-y: auto;
  width: 100%;
}

.nick-suggestions.hidden {
  display: none;
}

.nick-suggestion-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.nick-suggestion-btn:hover,
.nick-suggestion-btn.active {
  background: var(--accent-primary);
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Klipy Picker (GIF) Özelleştirmesi */
.klipy-popup {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 320px !important;
  max-width: 90vw !important;
  max-height: 350px !important;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  z-index: 999;
}

.klipy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  overflow-y: auto;
}

@media (max-width: 576px) {
  .klipy-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.klipy-item {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 1px solid var(--border-light);
  transition: transform 0.2s;
}

.klipy-item:hover {
  transform: scale(1.05);
  border-color: var(--accent-primary);
}

/* Equalizer Animation for Now Playing */
.equalizer-anim {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  margin-left: auto; /* Sağ köşeye yaslanması için */
}

.equalizer-anim span {
  display: block;
  width: 3px;
  background-color: var(--accent-primary);
  border-radius: 1px;
  animation: eq-bounce 1s infinite alternate ease-in-out;
}

.equalizer-anim span:nth-child(1) { animation-delay: 0.0s; }
.equalizer-anim span:nth-child(2) { animation-delay: 0.2s; }
.equalizer-anim span:nth-child(3) { animation-delay: 0.4s; }

@keyframes eq-bounce {
  0% { height: 20%; }
  100% { height: 100%; }
}

/* /list kanal listesi satırları */
.chanlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.chanlist-item:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-primary);
}
.chanlist-name {
  font-weight: 700;
  color: var(--accent-primary);
  white-space: nowrap;
}
.chanlist-users {
  font-size: 0.8em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.chanlist-topic {
  font-size: 0.85em;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
