/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Light theme (default) */
  --yt-bg: #ffffff;
  --yt-bg-2: #f2f2f2;
  --yt-bg-3: #e5e5e5;
  --yt-text-1: #0f0f0f;
  --yt-text-2: #606060;
  --yt-text-3: #909090;
  --yt-red: #ff0000;
  --yt-border: rgba(0,0,0,0.1);
  --yt-hover: rgba(0,0,0,0.05);
  --yt-search-bg: #ffffff;
  --yt-search-border: #ccc;
  --yt-search-btn-bg: #f8f8f8;
  --yt-search-btn-hover: #e5e5e5;
  --yt-thumb-bg: #f0f0f0;
  --yt-chip-hover: #e5e5e5;
  --yt-scrollbar: #ccc;
  --yt-scrollbar-hover: #aaa;
  --yt-spinner-track: rgba(0,0,0,0.1);
  /* Admin */
  --adm-bg: #f9f9f9;
  --adm-card-bg: #ffffff;
  --adm-section-bg: #ffffff;
  --adm-item-bg: #f8f8f8;
  --adm-item-hover: #f0f0f0;
  --adm-input-bg: #ffffff;
  --adm-input-border: rgba(0,0,0,0.12);
  --adm-input-placeholder: #aaa;
  --adm-input-text: #0f0f0f;
  --adm-drag: #bbb;
  --adm-drag-hint: #aaa;
  --adm-btn-gray-bg: #f0f0f0;
  --adm-btn-gray-border: rgba(0,0,0,0.12);
  --adm-btn-gray-text: #0f0f0f;
  --adm-btn-gray-hover: #e5e5e5;
  --adm-stat-bg: #f0f0f0;
  --adm-header-bg: #ffffff;
  --adm-section-title: #909090;
  --adm-video-ch: #606060;
  --adm-empty: #aaa;
  --adm-back-link: #606060;

  --header-h: 56px;
  --sidebar-w: 240px;
  --font: Roboto, Arial, sans-serif;
}

[data-theme="dark"] {
  --yt-bg: #0f0f0f;
  --yt-bg-2: #1a1a1a;
  --yt-bg-3: #272727;
  --yt-text-1: #f1f1f1;
  --yt-text-2: #aaaaaa;
  --yt-text-3: #717171;
  --yt-border: rgba(255,255,255,0.1);
  --yt-hover: rgba(255,255,255,0.1);
  --yt-search-bg: #121212;
  --yt-search-border: #303030;
  --yt-search-btn-bg: #2e2e2e;
  --yt-search-btn-hover: #3a3a3a;
  --yt-thumb-bg: #282828;
  --yt-chip-hover: #3a3a3a;
  --yt-scrollbar: #555;
  --yt-scrollbar-hover: #666;
  --yt-spinner-track: rgba(255,255,255,0.1);
  --adm-bg: #0f0f0f;
  --adm-card-bg: #212121;
  --adm-section-bg: #1a1a1a;
  --adm-item-bg: #242424;
  --adm-item-hover: #2a2a2a;
  --adm-input-bg: #2a2a2a;
  --adm-input-border: rgba(255,255,255,0.12);
  --adm-input-placeholder: #555;
  --adm-input-text: #f1f1f1;
  --adm-drag: #555;
  --adm-drag-hint: #555;
  --adm-btn-gray-bg: #2a2a2a;
  --adm-btn-gray-border: rgba(255,255,255,0.12);
  --adm-btn-gray-text: #f1f1f1;
  --adm-btn-gray-hover: #333;
  --adm-stat-bg: #242424;
  --adm-header-bg: #212121;
  --adm-section-title: #888;
  --adm-video-ch: #888;
  --adm-empty: #555;
  --adm-back-link: #aaa;
}

html, body {
  font-family: var(--font);
  font-size: 14px;
  background: var(--yt-bg);
  color: var(--yt-text-1);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; color: inherit; font-family: var(--font); }
img { display: block; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--yt-scrollbar); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--yt-scrollbar-hover); }

/* ===== HEADER ===== */
.yt-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--yt-bg);
  border-bottom: 1px solid var(--yt-border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 200;
  gap: 8px;
}

.yt-header-start {
  display: flex;
  align-items: center;
  gap: 12px;
  width: var(--sidebar-w);
  flex-shrink: 0;
}

.yt-header-mid {
  flex: 1;
  display: flex;
  justify-content: center;
}

.yt-header-end {
  display: flex;
  align-items: center;
  gap: 4px;
  width: var(--sidebar-w);
  justify-content: flex-end;
  flex-shrink: 0;
}

/* Icon button */
.yt-icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.1s;
  color: var(--yt-text-1);
}
.yt-icon-btn:hover { background: var(--yt-hover); }
.yt-icon-btn svg { width: 24px; height: 24px; fill: var(--yt-text-1); }

/* Logo */
.yt-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  user-select: none;
}
.yt-logo-icon { height: 20px; width: auto; flex-shrink: 0; }
.yt-logo-text {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--yt-text-1);
}

/* Search */
.yt-search {
  display: flex;
  width: 100%;
  max-width: 600px;
}
.yt-search-box {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--yt-search-bg);
  border: 1px solid var(--yt-search-border);
  border-right: none;
  border-radius: 40px 0 0 40px;
  height: 40px;
  padding: 0 16px;
  transition: border-color 0.2s;
}
.yt-search-box:focus-within { border-color: #1565c0; }
.yt-search-input {
  width: 100%; background: none; border: none; outline: none;
  font-size: 16px; color: var(--yt-text-1); font-family: var(--font);
}
.yt-search-input::placeholder { color: var(--yt-text-3); }
.yt-search-btn {
  width: 64px; height: 40px;
  background: var(--yt-search-btn-bg);
  border: 1px solid var(--yt-search-border);
  border-radius: 0 40px 40px 0;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.1s;
}
.yt-search-btn:hover { background: var(--yt-search-btn-hover); }
.yt-search-btn svg { width: 20px; height: 20px; fill: var(--yt-text-1); }

/* ===== LAYOUT ===== */
.yt-layout { display: flex; padding-top: var(--header-h); }

/* ===== SIDEBAR ===== */
.yt-sidebar {
  position: fixed;
  top: var(--header-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  overflow-y: auto; overflow-x: hidden;
  padding: 12px 0;
  scrollbar-width: none;
}
.yt-sidebar::-webkit-scrollbar { display: none; }

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 149;
}
.sidebar-backdrop.show { display: block; }

@media (max-width: 800px) {
  .yt-sidebar.open {
    display: block !important;
    background: var(--yt-bg);
    z-index: 150;
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
  }
}

.yt-sidebar-section {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--yt-border);
  margin-bottom: 12px;
}
.yt-sidebar-section:last-child { border-bottom: none; }

.yt-sidebar-item {
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px;
  height: 40px;
  border-radius: 10px;
  margin: 0 8px;
  cursor: pointer;
  transition: background 0.1s;
  font-size: 14px;
  font-weight: 400;
}
.yt-sidebar-item:hover { background: var(--yt-hover); }
.yt-sidebar-item.active { background: var(--yt-bg-3); font-weight: 500; }
.yt-sidebar-item svg { width: 24px; height: 24px; fill: var(--yt-text-1); flex-shrink: 0; }

/* ===== MAIN ===== */
.yt-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 24px;
}

/* Filter chips */
.yt-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 20px;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.yt-chips::-webkit-scrollbar { display: none; }
.yt-chip {
  height: 32px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--yt-bg-3);
  color: var(--yt-text-1);
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: background 0.1s;
}
.yt-chip:hover { background: var(--yt-chip-hover); }
.yt-chip.active { background: var(--yt-text-1); color: var(--yt-bg); }

/* Video Grid */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 12px;
}

/* Video Card */
.yt-card {
  cursor: pointer;
  border-radius: 0;
}
.yt-card:hover .yt-thumb-img { transform: scale(1.03); }

.yt-thumb {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
  border-radius: 12px;
  background: var(--yt-thumb-bg);
  margin-bottom: 12px;
}
.yt-thumb-img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}
.yt-thumb-dur {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 12px; font-weight: 500;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.yt-card-info {
  display: flex;
  gap: 12px;
}
.yt-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4444, #ff9900);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  user-select: none;
}
.yt-card-meta { flex: 1; min-width: 0; }
.yt-card-title {
  font-size: 14px; font-weight: 500;
  line-height: 1.4;
  color: var(--yt-text-1);
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-card-channel {
  font-size: 13px;
  color: var(--yt-text-2);
  margin-bottom: 2px;
}
.yt-card-channel:hover { color: var(--yt-text-1); }

/* ===== WATCH PAGE ===== */
.yt-watch-layout {
  display: flex;
  padding-top: var(--header-h);
  min-height: 100vh;
  padding-left: 24px;
}

.yt-watch-primary {
  flex: 1;
  min-width: 0;
  padding: 24px 24px 24px 0;
}

.yt-watch-secondary {
  width: 402px;
  flex-shrink: 0;
  padding: 24px 24px 24px 0;
}

/* Player container (fullscreen wrapper) */
.yt-player-container {
  width: 100%;
}
.yt-player-container:fullscreen,
.yt-player-container:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  background: #000;
  width: 100%;
  height: 100%;
}
.yt-player-container:fullscreen .yt-player-wrap,
.yt-player-container:-webkit-full-screen .yt-player-wrap {
  flex: 1;
  border-radius: 0;
  min-height: 0;
}
.yt-player-container:fullscreen .yt-player-ratio,
.yt-player-container:-webkit-full-screen .yt-player-ratio {
  padding-bottom: 0 !important;
  height: 100%;
}
.yt-player-container:fullscreen .yt-custom-bar,
.yt-player-container:-webkit-full-screen .yt-custom-bar {
  flex-shrink: 0;
  border-radius: 0;
}

/* CSS fake fullscreen (iOS fallback) */
body.fs-open { overflow: hidden; }
.yt-player-container.fake-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background: #000;
  width: 100% !important;
  height: 100% !important;
}
.yt-player-container.fake-fullscreen .yt-player-wrap {
  flex: 1;
  border-radius: 0;
  min-height: 0;
}
.yt-player-container.fake-fullscreen .yt-player-ratio {
  padding-bottom: 0 !important;
  height: 100%;
}
.yt-player-container.fake-fullscreen .yt-custom-bar {
  flex-shrink: 0;
  border-radius: 0;
}

/* Player */
.yt-player-wrap {
  width: 100%;
  background: #000;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}
.yt-player-ratio {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}
.yt-player-ratio iframe {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
/* Tüm video alanını kaplayan overlay — YouTube linklerini engeller */
.yt-click-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 10;
  cursor: pointer;
  background: transparent;
  transition: background 0.2s;
}
.yt-click-overlay.ended {
  background: #000;
  cursor: default;
}
.yt-click-overlay.paused {
  background: rgba(0,0,0,0.55);
}
.yt-click-overlay.paused::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 0; height: 0;
  border-style: solid;
  border-width: 28px 0 28px 52px;
  border-color: transparent transparent transparent rgba(255,255,255,0.9);
}

/* Özel kontrol çubuğu */
.yt-custom-bar {
  display: flex;
  align-items: center;
  padding: 4px 10px;
  background: #000;
  border-radius: 0 0 12px 12px;
  gap: 8px;
}
.yt-ctrl-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  transition: background 0.15s;
  flex-shrink: 0;
}
.yt-ctrl-btn:hover { background: rgba(255,255,255,0.15); }
.yt-ctrl-btn svg { width: 22px; height: 22px; fill: #fff; }

.yt-ctrl-time {
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-family: var(--font);
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 32px;
}

.yt-progress-wrap {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: height 0.1s;
}
.yt-progress-wrap:hover { height: 6px; }
.yt-progress-fill {
  height: 100%;
  width: 0%;
  background: #ff0000;
  border-radius: 2px;
  pointer-events: none;
  transition: width 0.4s linear;
}

/* Volume control */
.yt-vol-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.yt-vol-slider-wrap {
  width: 0;
  overflow: hidden;
  transition: width 0.2s ease;
}
.yt-vol-wrap:hover .yt-vol-slider-wrap,
.yt-vol-slider-wrap:focus-within {
  width: 120px;
}
.yt-vol-slider {
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  transition: height 0.1s;
}
.yt-vol-slider:hover { height: 6px; }
.yt-vol-fill {
  height: 100%;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  pointer-events: none;
}

/* Below player */
.yt-watch-below { padding: 16px 0; }

.yt-watch-title {
  font-size: 20px; font-weight: 600;
  line-height: 1.4;
  color: var(--yt-text-1);
  margin-bottom: 12px;
}

.yt-watch-meta-row {
  display: flex; align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--yt-border);
  border-bottom: 1px solid var(--yt-border);
}
.yt-watch-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff4444, #ff9900);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.yt-watch-ch-name { font-size: 15px; font-weight: 500; }
.yt-watch-ch-sub { font-size: 13px; color: var(--yt-text-2); }

/* Related / Queue */
.yt-queue-header {
  font-size: 16px; font-weight: 600;
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.yt-queue-header svg { width: 20px; height: 20px; fill: var(--yt-red); }

.yt-rel-item {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  border-radius: 8px;
  padding: 6px;
  transition: background 0.1s;
}
.yt-rel-item:hover { background: var(--yt-hover); }
.yt-rel-item.now-playing { background: var(--yt-bg-3); }

.yt-rel-thumb {
  position: relative;
  width: 168px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--yt-thumb-bg);
}
.yt-rel-thumb img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
}
.yt-rel-thumb .yt-thumb-dur { bottom: 4px; right: 4px; font-size: 11px; }

.yt-rel-meta { flex: 1; min-width: 0; }
.yt-rel-title {
  font-size: 13px; font-weight: 500;
  color: var(--yt-text-1);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.yt-rel-channel { font-size: 12px; color: var(--yt-text-2); }

.now-playing-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--yt-red); font-weight: 500;
  margin-top: 4px;
}
.now-playing-badge::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--yt-red);
  border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ===== ADMIN PANEL ===== */
.adm-layout {
  min-height: 100vh;
  background: var(--adm-bg);
  font-family: var(--font);
  color: var(--yt-text-1);
}

.adm-login-wrap {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.adm-login-card {
  background: var(--adm-card-bg);
  border: 1px solid var(--yt-border);
  border-radius: 16px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  text-align: center;
}
.adm-login-logo {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-bottom: 32px;
}
.adm-login-logo .yt-logo-icon { height: 26px; }
.adm-login-logo .yt-logo-text { font-size: 24px; }
.adm-login-card h2 { font-size: 18px; color: var(--yt-text-2); margin-bottom: 28px; }

.adm-header {
  background: var(--adm-header-bg);
  padding: 0 24px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--yt-border);
  position: sticky; top: 0; z-index: 10;
}
.adm-header-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 18px; font-weight: 600;
}

.adm-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

.adm-section {
  background: var(--adm-section-bg);
  border: 1px solid var(--yt-border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.adm-section-title {
  font-size: 13px; font-weight: 600;
  color: var(--adm-section-title);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

/* Inputs */
.adm-input {
  width: 100%;
  background: var(--adm-input-bg);
  border: 1px solid var(--adm-input-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--adm-input-text);
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}
.adm-input:focus { border-color: var(--yt-red); }
.adm-input::placeholder { color: var(--adm-input-placeholder); }

.adm-row { display: flex; gap: 12px; }
.adm-row .adm-input { flex: 1; }

/* Buttons */
.adm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px; font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  white-space: nowrap;
  border: none;
}
.adm-btn-red { background: var(--yt-red); color: #fff; }
.adm-btn-red:hover { background: #cc0000; }
.adm-btn-gray {
  background: var(--adm-btn-gray-bg);
  color: var(--adm-btn-gray-text);
  border: 1px solid var(--adm-btn-gray-border);
}
.adm-btn-gray:hover { background: var(--adm-btn-gray-hover); }
.adm-btn-danger { background: transparent; color: #ff5555; border: 1px solid #ff5555; padding: 7px 14px; font-size: 13px; }
.adm-btn-danger:hover { background: rgba(255,85,85,0.12); }
.adm-btn-sm { padding: 7px 14px; font-size: 13px; }
.adm-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Video list */
.adm-video-list { display: flex; flex-direction: column; gap: 10px; }

.adm-video-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--adm-item-bg);
  border-radius: 10px;
  transition: background 0.1s;
}
.adm-video-item:hover { background: var(--adm-item-hover); }

.adm-drag {
  color: var(--adm-drag);
  cursor: grab;
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1;
  padding: 4px;
}
.adm-drag:active { cursor: grabbing; }

.adm-video-thumb {
  width: 120px; height: 68px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--yt-thumb-bg);
}
.adm-video-meta { flex: 1; min-width: 0; }
.adm-video-title {
  font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.adm-video-ch { font-size: 12px; color: var(--adm-video-ch); }
.adm-video-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* Messages */
.adm-msg { font-size: 13px; margin-top: 10px; height: 18px; }
.adm-msg.err { color: #ff5555; }
.adm-msg.ok { color: #4caf50; }

.adm-empty {
  text-align: center; padding: 40px;
  color: var(--adm-empty); font-size: 15px;
}

/* Stats */
.adm-stats { display: flex; gap: 16px; margin-bottom: 8px; }
.adm-stat {
  background: var(--adm-stat-bg);
  border-radius: 10px;
  padding: 16px 20px;
  flex: 1; text-align: center;
}
.adm-stat-num { font-size: 28px; font-weight: 700; color: var(--yt-red); }
.adm-stat-label { font-size: 13px; color: var(--yt-text-2); margin-top: 4px; }

/* ===== SHARED UTILITIES ===== */
.yt-loading {
  display: flex; align-items: center; justify-content: center;
  padding: 60px;
}
.yt-spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--yt-spinner-track);
  border-top-color: var(--yt-red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.yt-empty {
  text-align: center; padding: 80px 24px;
  color: var(--yt-text-2);
}
.yt-empty h3 { font-size: 18px; margin-bottom: 8px; color: var(--yt-text-1); }
.yt-empty p { font-size: 14px; }

/* Channel link (in cards and watch page) */
.yt-ch-link {
  color: inherit;
  text-decoration: none;
}
.yt-ch-link:hover {
  color: var(--yt-text-1);
  text-decoration: underline;
}

/* ===== CHANNEL PAGE ===== */
.ch-page {
  margin-top: var(--header-h);
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.ch-banner {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg,#c62828,#e64a19);
}

.ch-info-wrap {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 0 24px 20px;
  margin-top: -40px;
}

.ch-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  border: 4px solid var(--yt-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.ch-info {
  padding-bottom: 4px;
}

.ch-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--yt-text-1);
  line-height: 1.2;
}

.ch-stats {
  font-size: 13px;
  color: var(--yt-text-2);
  margin-top: 4px;
}

.ch-tabs {
  display: flex;
  border-bottom: 1px solid var(--yt-border);
  padding: 0 24px;
  gap: 0;
}

.ch-tab {
  font-size: 14px;
  font-weight: 500;
  color: var(--yt-text-2);
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.ch-tab.active {
  color: var(--yt-text-1);
  border-bottom-color: var(--yt-text-1);
}

.ch-content {
  padding: 24px;
}

@media (max-width: 800px) {
  .ch-banner { height: 100px; }
  .ch-info-wrap { margin-top: -28px; gap: 14px; padding: 0 16px 16px; }
  .ch-avatar { width: 56px; height: 56px; font-size: 22px; }
  .ch-name { font-size: 17px; }
  .ch-content { padding: 16px; }
}

.yt-toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #333; color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 9999;
  transition: transform 0.25s;
  white-space: nowrap;
  pointer-events: none;
}
.yt-toast.show { transform: translateX(-50%) translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1300px) {
  .yt-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1100px) {
  .yt-watch-secondary { width: 340px; }
}
@media (max-width: 900px) {
  .yt-watch-layout { flex-direction: column; padding-left: 0; }
  .yt-watch-primary { padding: 0 16px 16px; max-width: none; }
  .yt-watch-secondary { width: 100%; padding: 0 16px 24px; }
  .yt-player-wrap { border-radius: 0; }
}
@media (max-width: 800px) {
  .yt-sidebar { display: none; }
  .yt-main { margin-left: 0; padding: 16px; }
  .yt-header-start { width: auto; }
  .yt-header-end { width: auto; }
  .yt-grid { grid-template-columns: repeat(1, 1fr); }
}
@media (max-width: 600px) {
  .yt-rel-thumb { width: 120px; }
}
