/* v2 k?pr?: eski UI ayn? kals?n, Next i?in ufak d?zeltmeler */
html, body {
  height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.google-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-left: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.google-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  background: #f8f9fa;
}

.google-login-btn .google-g {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.auth-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8f9fa;
  border-radius: 10px;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

.player-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
  padding: 16px;
}

.v2-player-wrap {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.v2-player-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 180px;
  background: #000;
}

.v2-player-wrap iframe,
.v2-player-wrap #youtube-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.v2-now-playing {
  display: none !important; /* Eski sitede alt bar yok ? overlay kullan?l?yor */
}

.v2-player-wrap {
  position: relative;
}

/* Web ?alan ?ark? overlay ? player i?inde sol ?st (eski #web-player-overlay) */
#web-player-slot .v2-player-wrap #web-player-overlay,
#web-player-slot .player-placeholder #web-player-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
}

#web-player-slot .v2-player-wrap .v2-player-media,
#web-player-slot .v2-player-wrap iframe,
#web-player-slot .v2-player-wrap #youtube-player {
  position: relative;
  z-index: 1;
}

#web-player-slot .web-overlay-song-info {
  pointer-events: auto;
}

.web-view #web-player-overlay.web-only {
  display: block !important;
}

.v2-queue-empty {
  padding: 10px;
  font-size: 13px;
  color: #888;
}

.v2-queue-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.v2-queue-item img {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 4px;
  background: #222;
}

.v2-queue-pos {
  width: 18px;
  font-size: 12px;
  color: #888;
  flex-shrink: 0;
}

.v2-queue-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.v2-queue-by {
  font-size: 11px;
  color: #888;
}

/* Otomatik ?alma listesi ? eski site sat?r g?r?n?m? */
.v2-auto-playlist-list {
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
}

.v2-playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid #f1f1f1;
  background: #fff;
}

.v2-playlist-item:last-child {
  border-bottom: none;
}

.v2-playlist-item:hover {
  background: #f8f9fa;
}

.v2-playlist-pos {
  width: 28px;
  height: 24px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5b6ee1, #3d4db8);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.v2-playlist-thumb {
  width: 54px;
  height: 40px;
  border-radius: 5px;
  overflow: hidden;
  flex-shrink: 0;
  background: #eee;
  cursor: pointer;
}

.v2-playlist-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v2-playlist-details {
  flex: 1;
  min-width: 0;
}

.v2-playlist-title {
  font-size: 13px;
  font-weight: 600;
  color: #222;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-playlist-meta {
  margin-top: 3px;
  font-size: 11px;
  color: #666;
  display: flex;
  gap: 6px;
  align-items: center;
}

.v2-playlist-del {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: #fde8e8;
  color: #c0392b;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

.v2-playlist-del:hover {
  background: #f5c6c6;
}

.chat-message.v2-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.chat-message.v2-msg img.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.chat-message.v2-msg .msg-body {
  flex: 1;
  min-width: 0;
}

.chat-message.v2-msg .msg-user {
  font-weight: 700;
  font-size: 0.85rem;
  color: #667eea;
  margin-right: 6px;
}

.chat-message.v2-msg .msg-time {
  font-size: 0.7rem;
  color: #999;
}

.chat-message.v2-msg .msg-text {
  font-size: 0.9rem;
  word-break: break-word;
}

.chat-system-line {
  text-align: center;
  color: #888;
  font-size: 0.8rem;
  padding: 4px 0;
}

/* Canl? yay?n */
.live-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 4px;
}
.v2-player-wrap,
.player-placeholder {
  position: relative;
}
.live-active {
  outline: 2px solid #e74c3c;
}

/* DM paneli */
.dm-bell-btn {
  position: relative;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 18px;
  padding: 6px 8px;
  margin-right: 4px;
}
.dm-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: #e74c3c;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.dm-badge.inline {
  position: static;
  margin-left: 6px;
}
.dm-panel {
  position: fixed;
  right: 16px;
  top: 72px;
  width: min(360px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 90px));
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #222;
}
.dm-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
}
.dm-list,
.dm-thread {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 10px;
}
.dm-search {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 8px;
}
.dm-row {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}
.dm-row:hover {
  background: #f3f4f6;
}
.dm-row img,
.dm-peer img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.dm-row-name {
  font-weight: 700;
  font-size: 13px;
}
.dm-row-preview {
  font-size: 12px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.dm-back {
  border: none;
  background: transparent;
  cursor: pointer;
  align-self: flex-start;
  margin-bottom: 6px;
  color: #555;
}
.dm-peer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  margin-bottom: 8px;
}
.dm-messages {
  flex: 1;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0 10px;
  min-height: 180px;
}
.dm-bubble {
  max-width: 85%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.35;
}
.dm-bubble.own {
  align-self: flex-end;
  background: #667eea;
  color: #fff;
}
.dm-bubble.other {
  align-self: flex-start;
  background: #f1f3f5;
  color: #222;
}
.dm-bubble small {
  display: block;
  opacity: 0.75;
  font-size: 10px;
  margin-top: 4px;
}
.dm-compose {
  display: flex;
  gap: 6px;
}
.dm-compose input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.dm-compose button {
  border: none;
  background: #667eea;
  color: #fff;
  border-radius: 8px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
}

/* Profil */
.profile-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.profile-hero {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}
.profile-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #eee;
}
.profile-role {
  color: #888;
  font-size: 13px;
  margin: 4px 0 8px;
}
.profile-bio {
  color: #444;
  line-height: 1.5;
}

/* === Mobil oyuncu + overlay istek listesi (eski player.php) === */
#mobile-player-slot #timarhane-player-container {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  z-index: 1;
}

#mobile-player-slot .v2-player-wrap,
#mobile-player-slot .player-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  overflow: hidden;
}

#mobile-player-slot .v2-player-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}

#mobile-player-slot .v2-now-playing {
  display: none;
}

/* Web g?r?n?mde ?alan ?ark? overlay her zaman g?r?ns?n */
.web-view #web-player-overlay.web-only {
  display: block !important;
}

/* DevTools / dar pencere: overlay g?r?ns?n (coarse pointer ?art? olmadan) */
@media (max-width: 767px) {
  .mobile-view #mobile-player-overlay.mobile-only {
    display: block !important;
  }
  .mobile-view .overlay-volume-controls {
    display: flex !important;
  }
  .mobile-view .overlay-request-queue {
    display: flex;
  }
}

/* Sohbet mesaj? ? eski float avatar d?zeni */
.chat-message.v2-msg .message-avatar {
  float: left;
  margin-right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
}
.chat-message.v2-msg .message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}
.chat-message.v2-msg .message-content {
  overflow: hidden;
}
.chat-message.v2-msg .message-time {
  font-size: 10px;
  color: #888;
  margin-left: 8px;
}

/* Web istek listesi sat?rlar? ? context_menu.css ile uyum */
.web-request-queue-container .request-queue-container {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}
.web-request-queue-container .request-queue-list {
  max-height: 240px;
  overflow-y: auto;
}

/* Kanal ayarlar? modal ? eski siteye yak?n */
.channel-settings-overlay .channel-info-modal-panel,
.channel-settings-overlay .channel-settings-panel {
  background: #fff;
  border-radius: 12px;
  max-width: 920px;
  width: 96vw;
  max-height: 90vh;
  overflow: auto;
  padding: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}
.channel-settings-header {
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
  background: #f8f9fa;
}
.channel-settings-body {
  padding: 16px 20px 24px;
}
.channel-settings-hint {
  margin-bottom: 12px;
}
.channel-settings-overlay .modal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  background: #f1f3f5;
  border-bottom: 1px solid #e9ecef;
}
.channel-settings-overlay .tab-btn {
  border: 1px solid #dee2e6;
  background: #fff;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #495057;
}
.channel-settings-overlay .tab-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: #fff;
  font-weight: 600;
}
.compact-permissions-container {
  width: 100%;
  overflow-x: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e8e8e8;
}
.compact-permissions-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.compact-permissions-table th {
  background: #007bff;
  color: #fff;
  padding: 10px 6px;
  font-size: 12px;
  text-align: center;
}
.compact-permissions-table th.role-column {
  text-align: left;
  padding-left: 12px;
  min-width: 120px;
}
.compact-permissions-table td {
  padding: 8px 4px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}
.compact-permissions-table td:first-child {
  text-align: left;
  padding-left: 12px;
  font-weight: 600;
}
.compact-permissions-table .toggle-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.compact-permissions-table .toggle-switch input {
  margin-right: 4px;
}
.compact-permissions-table .toggle-text {
  font-size: 11px;
}
.compact-permissions-table .number-input-container input {
  width: 48px;
  padding: 4px 6px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
}
.unlimited-badge,
.banned-badge,
.protected-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
}
.unlimited-badge { background: linear-gradient(45deg, #28a745, #20c997); }
.banned-badge { background: linear-gradient(45deg, #dc3545, #e74c3c); }
.protected-badge { background: linear-gradient(45deg, #ffc107, #fd7e14); color: #222; }
.manual-save-info {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #f8f9fa;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  color: #555;
}
.duration-filters-section {
  margin-top: 20px;
}
.duration-filter-card {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.duration-filter-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.filter-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.filter-header i {
  color: #6366f1;
  font-size: 18px;
}
.filter-title { font-weight: 700; color: #1e293b; }
.filter-description {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
}
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.duration-input-group {
  display: flex;
  gap: 8px;
  align-items: center;
}
.duration-input-group input {
  width: 80px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}
.duration-input-group select {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}
.background-settings-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.background-action-btn {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
}
.background-action-btn.active {
  border-color: #007bff;
  background: #e7f1ff;
}
.settings-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.channel-live-link-input {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ced4da;
}
.channel-title-clickable {
  display: block;
  border-radius: 10px;
  padding: 4px 8px;
}
.channel-settings-overlay .role-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
}
.channel-settings-overlay .role-btn:hover {
  border-color: #007bff;
  background: #f0f7ff;
}
.channel-settings-overlay .upload-area {
  border: 2px dashed #007bff;
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  background: #f8fbff;
}
.v2-emoji-picker, .v2-gif-picker {
  z-index: 12000;
}
