* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0f0f0f;
  font-family: 'Segoe UI', Roboto, sans-serif;
  color: #f1f1f1;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}



/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid #2a2a2a;
}

/* YouTube abone ol butonunu ve logo'yu gizle */
.plyr__video-embed iframe {
  pointer-events: none;
}

.ytp-chrome-top,
.ytp-show-cards-title,
.ytp-subscribe-button,
.ytp-title-text {
  display: none !important;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #ff6b6b, #ee0000, #cc0000);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -0.5px;
  text-shadow: 0 0 20px rgba(255,0,0,0.2);
}

.logo-icon {
  font-size: 28px;
  margin-right: 4px;
  display: inline-block;
  filter: drop-shadow(0 2px 4px rgba(255,0,0,0.3));
}

/* BUTONLAR */
.btn {
  background: #272727;
  border: none;
  padding: 10px 20px;
  border-radius: 40px;
  color: white;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: #cc0000;
}

.btn-primary:hover {
  background: #ff0000;
}

.btn:hover {
  background: #3f3f3f;
  transform: translateY(-1px);
}

/* KANAL ÇUBUĞU (yatay kaydırılabilir) */
.category-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0 20px 0;
  margin-bottom: 20px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.category-bar::-webkit-scrollbar {
  height: 4px;
}

.category-bar::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 10px;
}

.category-bar::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 10px;
}

/* Kanal butonları */
.channel-chip {
  background: #1f1f1f;
  padding: 8px 18px;
  border-radius: 40px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid #333;
  flex-shrink: 0;
}

.channel-chip.active {
  background: #cc0000;
  border-color: #cc0000;
  color: white;
}

.channel-chip:hover {
  background: #333;
  transform: translateY(-1px);
}

/* VIDEO GRID (TÜMÜ görünümü) */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Playlist modunda (kanal görünümü) grid özelliklerini kaldır */
#videoGrid.playlist-mode {
  display: block;
}

/* Normal modda (TÜMÜ) grid olarak göster */
#videoGrid.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Video kartı (genel) */
.video-card {
  background: #181818;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #282828;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  background: #202020;
  border-color: #ff0000;
  box-shadow: 0 8px 24px rgba(255,0,0,0.2);
}



/* Video thumbnail */
.video-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 12px 12px 0 0;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  transition: transform 0.3s;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.02);
}

/* Kart bilgileri */
.card-info {
  padding: 12px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #f1f1f1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-channel {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 6px;
}

.card-playlist {
  display: inline-block;
  background: #2c2c2c;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  color: #ff9999;
}

/* Playlist satırı - yatay kaydırma */
.playlist-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 12px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.playlist-row::-webkit-scrollbar {
  height: 6px;
}

.playlist-row::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 10px;
}

.playlist-row::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 10px;
}

.playlist-row::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/* Boş durum */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #888;
}

/* MODAL */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #121212;
  max-width: 700px;
  width: 100%;
  border-radius: 24px;
  padding: 24px;
  border: 1px solid #333;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 600;
}

.close-modal {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

/* Form elemanları */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #aaa;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  color: white;
  font-size: 14px;
}

.form-group select option {
  background: #1e1e1e;
}

/* Liste yöneticisi öğeleri */
.video-list-item {
  background: #1a1a1a;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.video-list-info {
  flex: 1;
}

.delete-video {
  background: none;
  border: none;
  color: #ff4444;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
}

.badge {
  background: #2c2c2c;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
}

.playlist-badge {
  background: #2c2c2c;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 11px;
  color: #ff9999;
}

/* ===== PLAYLIST GÖRÜNÜMÜ EKLERİ (SADECE EKLE) ===== */

/* Playlist blokları - alt alta sıralanır */
.playlist-block {
  margin-bottom: 40px;
  width: 100%;
}

/* Yatay kaydırma satırı */
.playlist-horizontal-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 12px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.playlist-horizontal-row::-webkit-scrollbar {
  height: 6px;
}

.playlist-horizontal-row::-webkit-scrollbar-track {
  background: #1a1a1a;
  border-radius: 10px;
}

.playlist-horizontal-row::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 10px;
}

.playlist-horizontal-row::-webkit-scrollbar-thumb:hover {
  background: #888;
}

/* Playlist içindeki video kartları */
.playlist-video-card {
  min-width: 280px;
  max-width: 280px;
  flex-shrink: 0;
  background: #181818;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid #282828;
  cursor: pointer;
}

.playlist-video-card:hover {
  transform: translateY(-4px);
  background: #202020;
  border-color: #ff0000;
  box-shadow: 0 8px 24px rgba(255,0,0,0.2);
}

/* Playlist kartlarının thumbnail alanı */
.playlist-video-card .video-thumbnail {
  position: relative;
  aspect-ratio: 16/9;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
}

.playlist-video-card .video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.playlist-video-card:hover .video-thumbnail img {
  transform: scale(1.02);
}

/* Oynatma butonu overlay */
.playlist-video-card .play-overlay {
  position: absolute;
  background: rgba(0,0,0,0.6);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  pointer-events: none;
}

/* Playlist kartlarının bilgi alanı */
.playlist-video-card .card-info {
  padding: 12px;
}

.playlist-video-card .card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #f1f1f1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-video-card .card-channel {
  font-size: 12px;
  color: #aaa;
}



/* Yardımcı sınıflar */
.flex-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ADMIN PANEL STILLERI */
.admin-tab {
  background: #1f1f1f;
  border: none;
  padding: 8px 20px;
  border-radius: 40px;
  color: #aaa;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.admin-tab.active {
  background: #cc0000;
  color: white;
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

/* Stat kartları */
.stat-card {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  border: 1px solid #2a2a2a;
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: #ff6666;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: #888;
}

/* Stat listeleri */
.stat-list {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #2a2a2a;
}

.stat-list-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #333;
}

.stat-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #252525;
  font-size: 13px;
}

.stat-rank {
  color: #ff8888;
  font-weight: 600;
  min-width: 30px;
}

.stat-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-count {
  color: #888;
  font-size: 11px;
  min-width: 50px;
  text-align: right;
}

.stat-channel {
  color: #666;
  font-size: 11px;
  margin-left: 8px;
}

.stat-list-empty {
  color: #666;
  text-align: center;
  padding: 20px;
  font-size: 13px;
}

.stat-list-more {
  color: #888;
  text-align: center;
  padding: 12px;
  font-size: 12px;
}

/* Admin video listesi öğeleri */
.admin-video-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: #161616;
  border-radius: 10px;
}

.admin-video-info {
  flex: 1;
}

.admin-video-title {
  font-size: 14px;
  margin-bottom: 4px;
}

.admin-video-stats {
  font-size: 10px;
  color: #ff8888;
  margin-left: 8px;
}

.admin-video-meta {
  font-size: 11px;
  color: #888;
  margin-bottom: 2px;
}

.admin-video-url {
  font-size: 10px;
  color: #555;
  word-break: break-all;
}

.admin-delete-video-btn,
.admin-delete-channel-btn {
  background: #2c2c2c;
  border: none;
  color: #ff8888;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
}

.admin-delete-video-btn:hover,
.admin-delete-channel-btn:hover {
  background: #3a1a1a;
}

.admin-danger-btn {
  background: #2c2c2c;
  border: none;
  color: #ff8888;
  padding: 8px 16px;
  border-radius: 24px;
  cursor: pointer;
  font-size: 13px;
}

.admin-danger-btn:hover {
  background: #3a1a1a;
}

.admin-action-btn {
  background: #272727;
  border: none;
  padding: 12px;
  border-radius: 40px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
}

.admin-primary-btn {
  background: #cc0000;
}

.admin-primary-btn:hover {
  background: #ff0000;
}

.admin-info-box {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: #888;
}

.admin-channel-header {
  transition: background 0.2s;
}

.admin-channel-header:hover {
  background: #222 !important;
}

.yeni-video-btn-not {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 12px;
  text-align: left;
  font-size: 11px;
  color: #888;
}

/* Sonraki video öğeleri için stiller */
.next-video-item {
  transition: background 0.2s;
}

.next-video-item:active {
  transform: scale(0.98);
}

/* Mobil için iyileştirmeler */
@media (max-width: 600px) {
  .next-video-item img {
    width: 100px !important;
    height: 56px !important;
  }
  
  #playerPageTitle {
    font-size: 14px;
  }
}

/* Plyr kontrollerinin düzgün görünmesi için */
.plyr {
  border-radius: 0;
}

.plyr__controls {
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* Plyr kontrollerinin dokunmatik cihazlarda düzgün çalışması için */
.plyr {
  border-radius: 0;
  cursor: pointer;
}

.plyr__controls {
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

/* Dokunmatik cihazlar için play butonunun tıklanabilir alanını büyüt */
.plyr__control {
  min-width: 44px;
  min-height: 44px;
}

.plyr__control--overlaid {
  background: rgba(204, 0, 0, 0.8);
  width: 64px;
  height: 64px;
  border-radius: 50%;
}

.plyr__control--overlaid:hover {
  background: rgba(255, 0, 0, 0.9);
}

/* Sonraki video öğeleri */
.next-video-item {
  transition: background 0.2s;
}

.next-video-item:active {
  transform: scale(0.98);
}

/* Yatay layout için (bilgisayar ve yatay telefon) */
@media (min-width: 768px) {
  .next-video-item img {
    width: 160px !important;
    height: 90px !important;
  }
}

/* Dikey telefon için */
@media (max-width: 767px) {
  .next-video-item img {
    width: 100px !important;
    height: 56px !important;
  }
  
  #playerPageTitle {
    font-size: 14px;
  }
}

/* Player sayfası geçiş efekti */
#videoPlayerPage {
  transition: all 0.3s ease;
}

/* Admin buton stilleri için eklemeler */
.admin-action-btn {
  background: #272727;
  border: none;
  padding: 12px;
  border-radius: 40px;
  color: white;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}

.admin-action-btn:hover {
  background: #3f3f3f;
  transform: translateY(-1px);
}

.admin-primary-btn {
  background: #cc0000;
}

.admin-primary-btn:hover {
  background: #ff0000;
}

.admin-info-box {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: #888;
}

.admin-danger-btn {
  background: #2c2c2c;
  border: none;
  color: #ff8888;
  padding: 8px 16px;
  border-radius: 24px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.admin-danger-btn:hover {
  background: #3a1a1a;
}

/* Responsive */
@media (max-width: 600px) {
  body { padding: 12px; }
  .video-grid { grid-template-columns: 1fr; }
  .playlist-video-card { min-width: 240px; max-width: 240px; }
  .modal-content { padding: 16px; }
}

/* Dikey telefon (portrait) */
@media (max-width: 600px) and (orientation: portrait) {
  body { padding: 12px; }
  .video-grid { grid-template-columns: 1fr; }
  .playlist-video-card { min-width: 240px; max-width: 240px; }
  .modal-content { padding: 16px; }
}

/* Yatay telefon (landscape) - ÖZEL ÇÖZÜM */
@media (max-width: 900px) and (orientation: landscape) {
  body { padding: 8px; }
  
  #videoPlayerPage {
    flex-direction: row !important;
  }
  
  #playerVideoSection {
    width: 55% !important;
    height: 100vh !important;
  }
  
  #playerListSection {
    width: 45% !important;
    height: 100vh !important;
    overflow-y: auto !important;
    padding: 8px !important;
  }
  
  #miniPlayerContainer {
    aspect-ratio: 16/9 !important;
    width: 100% !important;
  }
  
  .next-video-item img {
    width: 100px !important;
    height: 56px !important;
  }
  
  .next-video-item {
    padding: 6px !important;
    gap: 8px !important;
  }
  
  #playerPageTitle {
    font-size: 13px !important;
  }
}

/* Büyük tablet ve üzeri */
@media (min-width: 768px) and (orientation: landscape) {
  .next-video-item img {
    width: 160px !important;
    height: 90px !important;
  }
}
