/* ═══════════════════════════════════════════════════════════════
   Vika.OnLine — Главные стили
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Nunito:wght@400;600;700;800&display=swap');

/* ─── Сброс и базовые стили ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary:    #0f0f0f;
  --bg-secondary:  #1a1a2e;
  --bg-card:       #16213e;
  --bg-hover:      #1f2d4a;
  --accent:        #ff6b9d;
  --accent2:       #c44dff;
  --accent-grad:   linear-gradient(135deg, #ff6b9d, #c44dff);
  --text-primary:  #ffffff;
  --text-secondary:#aaaaaa;
  --text-muted:    #666666;
  --border:        #2a2a4a;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,0.4);
  --transition:    0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ─── Скроллбар ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Навигация ──────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,15,15,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.navbar-brand {
  font-family: 'Pacifico', cursive;
  font-size: 1.5rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
}
.btn-primary:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--accent);
  color: var(--accent);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--text-primary); background: var(--bg-hover); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-danger { background: #c0392b; color: #fff; }
.btn-danger:hover { background: #e74c3c; }

/* Аватар в навбаре */
.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}
.nav-user:hover { border-color: var(--accent); }
.nav-user img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.nav-user span { font-size: 0.875rem; font-weight: 700; }

/* ─── Баннер канала ──────────────────────────────────────────── */
.channel-banner {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.channel-banner img.banner-bg {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.channel-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(15,15,15,0.8) 100%);
}

/* ─── Шапка канала ───────────────────────────────────────────── */
.channel-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 20px 20px;
}

.channel-info {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-top: -50px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.channel-avatar-wrap {
  flex-shrink: 0;
}

.channel-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-secondary);
  box-shadow: var(--shadow);
}

.channel-meta {
  flex: 1;
  min-width: 200px;
  padding-bottom: 4px;
}

.channel-title {
  font-family: 'Pacifico', cursive;
  font-size: 2rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 4px;
}

.channel-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.channel-tabs {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.channel-tabs::-webkit-scrollbar { display: none; }

.channel-tab {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  border: none;
  background: transparent;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.channel-tab:hover { color: var(--text-primary); }
.channel-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ─── Сетка видео ────────────────────────────────────────────── */
.videos-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 20px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ─── Карточка видео ─────────────────────────────────────────── */
.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(255,107,157,0.15);
}

.video-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #000;
}

.video-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.video-card:hover .video-thumb img { transform: scale(1.05); }

.video-thumb-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  transition: var(--transition);
}
.video-card:hover .video-thumb-play { opacity: 1; }

.play-icon {
  width: 56px; height: 56px;
  background: rgba(255,107,157,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.video-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.video-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
}
.video-title a:hover { color: var(--accent); }

.video-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.video-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: var(--transition);
}
.action-btn:hover { border-color: var(--accent); color: var(--accent); }

.action-btn.liked {
  background: rgba(255,107,157,0.15);
  border-color: var(--accent);
  color: var(--accent);
}

.action-btn .icon { font-size: 1rem; }

.copy-btn {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}
.copy-btn:hover { border-color: var(--accent2); color: var(--accent2); }

/* ─── Пустое состояние ───────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 4rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 8px; color: var(--text-secondary); }

/* ─── Страница видео ─────────────────────────────────────────── */
.video-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
}

.video-player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.video-player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
}

.video-info-block {
  margin-top: 16px;
}

.video-page-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.4;
}

.video-page-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.video-page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.video-description {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ─── Комментарии ────────────────────────────────────────────── */
.comments-section {
  margin-top: 24px;
}

.comments-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comment-form {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.comment-form img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comment-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  resize: vertical;
  min-height: 60px;
  transition: var(--transition);
}
.comment-input:focus { outline: none; border-color: var(--accent); }

.comment-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.comment-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.comment-item img {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comment-body { flex: 1; }

.comment-author {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 8px;
  font-weight: 400;
}

.comment-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  word-break: break-word;
}

/* Боковая панель видео */
.video-sidebar { display: flex; flex-direction: column; gap: 12px; }

.sidebar-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.sidebar-video-card {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.sidebar-video-card:hover { border-color: var(--accent); }

.sidebar-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
}
.sidebar-thumb img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-info { flex: 1; min-width: 0; }
.sidebar-video-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.sidebar-video-title a:hover { color: var(--accent); }
.sidebar-meta { font-size: 0.75rem; color: var(--text-muted); }

/* ─── Модальные окна ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 420px;
  padding: 32px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.active .modal { transform: translateY(0); }

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 4px;
}

.modal-tab {
  flex: 1;
  padding: 8px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 6px;
  transition: var(--transition);
}
.modal-tab.active {
  background: var(--accent-grad);
  color: #fff;
}

.modal-tab-content { display: none; }
.modal-tab-content.active { display: block; }

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-input:focus { outline: none; border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }

.form-error {
  background: rgba(255,68,68,0.1);
  border: 1px solid rgba(255,68,68,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #ff8888;
  margin-bottom: 16px;
  display: none;
}
.form-error.visible { display: block; }

.form-success {
  background: rgba(68,255,68,0.1);
  border: 1px solid rgba(68,255,68,0.3);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #88ff88;
  margin-bottom: 16px;
  display: none;
}
.form-success.visible { display: block; }

.btn-block { width: 100%; justify-content: center; padding: 12px; font-size: 1rem; }

/* ─── Toast уведомления ──────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn 0.3s ease forwards;
  pointer-events: auto;
}

.toast.success { border-color: #44ff44; color: #88ff88; }
.toast.error   { border-color: #ff4444; color: #ff8888; }
.toast.info    { border-color: var(--accent2); color: var(--accent2); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(20px); }
}

/* ─── Админ-панель ───────────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

.admin-sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}

.admin-nav-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  padding: 8px 20px;
  margin-top: 8px;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
  border-left: 3px solid transparent;
}
.admin-nav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.admin-nav-link.active { color: var(--accent); border-left-color: var(--accent); background: rgba(255,107,157,0.05); }
.admin-nav-link .nav-icon { font-size: 1.1rem; }

.admin-content {
  flex: 1;
  padding: 28px;
  overflow-x: hidden;
}

.admin-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Карточки статистики */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Таблицы */
.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.admin-table th {
  background: var(--bg-secondary);
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:hover td { background: var(--bg-hover); }

.admin-table .thumb-cell img {
  width: 80px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 6px;
}

/* Форма загрузки */
.upload-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 640px;
}

.upload-form .form-group { margin-bottom: 20px; }

.file-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
}
.file-drop-zone:hover, .file-drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(255,107,157,0.05);
  color: var(--accent);
}
.file-drop-zone .drop-icon { font-size: 2.5rem; margin-bottom: 8px; }
.file-drop-zone input[type=file] { display: none; }

.progress-bar-wrap {
  background: var(--bg-primary);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  margin-top: 8px;
  display: none;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent-grad);
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

/* Бейджи */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-admin { background: rgba(255,107,157,0.2); color: var(--accent); }
.badge-user  { background: rgba(196,77,255,0.2); color: var(--accent2); }

/* ─── Страница профиля ───────────────────────────────────────── */
.profile-edit-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  max-width: 520px;
}

/* ─── Баннер главной страницы ───────────────────────────────── */
.home-banner {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #1a1a2e;
}

/* Изображение баннера — всегда на всю ширину, обрезается по высоте */
.home-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  max-width: none;
}

/* Тёмный оверлей снизу — усиленный для читаемости текста */
.home-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15,15,15,0.05) 0%,
    rgba(15,15,15,0.72) 100%
  );
  z-index: 1;
}

/* Заголовок поверх баннера */
.home-banner-title {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 2;
}

.home-title {
  font-family: 'Pacifico', cursive;
  font-size: 2rem;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 4px;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7));
}

.home-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

/* ─── Полоска с вкладками под баннером ──────────────────────── */
.home-channel-bar {
  position: relative;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.home-tabs {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── Автор видео в карточке ─────────────────────────────────── */
.video-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  transition: var(--transition);
}
.video-author:hover { color: var(--accent); }
.video-author img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ─── Статус кодирования видео ───────────────────────────────── */
.encode-status-cell { min-width: 160px; }

.encode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}
.encode-badge.done       { background: rgba(68,255,68,0.12);    color: #88ff88; }
.encode-badge.pending    { background: rgba(255,200,0,0.12);    color: #ffd060; }
.encode-badge.processing { background: rgba(100,160,255,0.15);  color: #80b8ff; }
.encode-badge.error      { background: rgba(255,68,68,0.12);    color: #ff8888; }

.encode-progress-wrap {
  margin-top: 6px;
  height: 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  width: 100%;
}
.encode-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #ff6b9d, #c44dff);
  transition: width 0.5s ease;
}
.encode-eta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ─── Бургер-меню (мобильная навигация) ─────────────────────── */
.navbar-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  flex-shrink: 0;
  transition: var(--transition);
}
.navbar-burger:hover { border-color: var(--accent); }
.navbar-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
  transform-origin: center;
}
/* Анимация в крестик */
.navbar-burger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar-burger.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.navbar-burger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Мобильный dropdown */
.navbar-dropdown {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: rgba(15, 15, 15, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
  z-index: 99;
  flex-direction: column;
  /* Анимация появления */
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.navbar-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.navbar-dropdown-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition);
}
.navbar-dropdown-user:hover { background: var(--bg-hover); }
.navbar-dropdown-user img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.navbar-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 0;
}

.navbar-dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}
.navbar-dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.navbar-dropdown-primary {
  color: var(--accent);
}
.navbar-dropdown-primary:hover {
  color: #fff;
  background: rgba(255, 107, 157, 0.15);
}
.navbar-dropdown-btn {
  color: var(--text-muted);
}
.navbar-dropdown-btn:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.08);
}

/* ─── Адаптивность ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .video-page {
    grid-template-columns: 1fr;
  }
  .video-sidebar { display: none; }
  .admin-sidebar { width: 200px; }
}

@media (max-width: 768px) {
  .navbar { padding: 0 14px; }
  .navbar-brand { font-size: 1.2rem; }

  /* Скрываем десктоп-кнопки, показываем бургер */
  .navbar-actions { display: none; }
  .navbar-burger  { display: flex; }
  .navbar-dropdown { display: flex; }

  /* Баннер главной страницы */
  .home-banner { height: 160px; }
  .home-banner-title { bottom: 14px; }
  .home-title { font-size: 1.6rem; }
  .home-subtitle { font-size: 0.85rem; }

  .channel-banner { height: 140px; }
  .channel-avatar { width: 72px; height: 72px; }
  .channel-title { font-size: 1.4rem; }
  .channel-info { margin-top: -36px; gap: 12px; }

  .videos-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
  }

  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    width: 100%;
    height: auto;
    position: static;
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    gap: 4px;
  }
  .admin-nav-title { display: none; }
  .admin-nav-link {
    padding: 8px 12px;
    border-left: none;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
  }
  .admin-nav-link.active { border-left: none; background: rgba(255,107,157,0.15); }
  .admin-content { padding: 16px; }

  .modal { padding: 24px 20px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  /* Баннер главной страницы */
  .home-banner { height: 120px; }
  .home-banner-title { bottom: 10px; left: 14px; right: 14px; }
  .home-title { font-size: 1.3rem; }
  .home-subtitle { font-size: 0.8rem; }

  .videos-grid { grid-template-columns: 1fr; }
  .channel-tabs { gap: 0; }
  .channel-tab { padding: 10px 14px; font-size: 0.82rem; }
  .video-page { padding: 16px 14px; }
  .btn { padding: 7px 14px; font-size: 0.82rem; }
  .toast-container { bottom: 16px; right: 16px; left: 16px; }
  .toast { font-size: 0.82rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── Утилиты ────────────────────────────────────────────────── */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-center  { text-align: center; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.hidden { display: none !important; }
