* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0f0f0f;
  color: #f1f1f1;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background-color: #0f0f0f;
  display: flex;
  justify-content: center;
  z-index: 100;
  border-bottom: 1px solid #222;
}

.header__inner {
  width: 100%;
  max-width: 1600px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 8px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.header__logo img {
  display: block;
  height: 32px;
  width: auto;
}

.header__logo span {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}

/* --- Search: desktop --- */
.header__search {
  display: flex;
  align-items: center;
  flex: 0 1 640px;
  max-width: 640px;
}

.header__search-input {
  width: 100%;
  padding: 0 16px;
  height: 40px;
  background: #121212;
  border: 1px solid #303030;
  border-radius: 20px 0 0 20px;
  color: #fff;
  font-size: 15px;
  outline: none;
}

.header__search-input::placeholder { color: #888; }
.header__search-input:focus { border-color: #1c62b9; }

.header__search-btn {
  height: 40px;
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #222;
  border: 1px solid #303030;
  border-left: none;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
  flex-shrink: 0;
}

.header__search-btn:hover { background: #333; }

.header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header__icon-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
  background: none;
  border: none;
  color: #f1f1f1;
}

.header__icon-btn:hover { background: #272727; }

.header__upload-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.header__upload-btn:hover { background: #272727; }

.header__avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.header__avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #8b5cf6;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
  color: #fff;
  padding: 0;
  overflow: hidden;
}

.header__avatar-btn:hover { opacity: 0.85; }

.header__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header__avatar-letter {
  line-height: 1;
}

/* --- Avatar dropdown --- */
.header__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #1f1f1f;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 8px 0;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

.header__dropdown--visible {
  display: block;
}

.header__dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 12px;
  border-bottom: 1px solid #333;
  margin-bottom: 4px;
}

.header__dropdown-avatar,
.header__dropdown-letter {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
}

.header__dropdown-avatar {
  object-fit: cover;
}

.header__dropdown-letter {
  background: #8b5cf6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.header__dropdown-name {
  font-weight: 600;
  font-size: 14px;
  color: #f1f1f1;
}

.header__dropdown-role {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

.header__dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #ccc;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.header__dropdown-item:hover {
  background: #2a2a2a;
  color: #f1f1f1;
}

.header__dropdown-item--danger {
  color: #ff6b6b;
}

.header__dropdown-item--danger:hover {
  background: #2a1a1a;
  color: #ff4444;
}

.header__auth-btn {
  height: 36px;
  padding: 0 16px;
  border: 1px solid #555;
  border-radius: 18px;
  color: #f1f1f1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, border-color 0.2s;
  background: transparent;
  white-space: nowrap;
}

.header__auth-btn:hover {
  background: #1f1f1f;
  border-color: #888;
}

/* --- Mobile search overlay --- */
.header__mobile-search {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  background: #0f0f0f;
  padding: 8px 12px;
  border-bottom: 1px solid #222;
  z-index: 99;
}

.header__mobile-search--visible {
  display: flex;
  gap: 8px;
}

.header__mobile-search .header__search-input {
  border-radius: 20px;
  flex: 1;
}

.header__mobile-search .header__search-btn {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  border: 1px solid #303030;
}

/* --- Mobile hamburger menu --- */
.header__menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  border: none;
  color: #f1f1f1;
}

/* ===== Mobile nav fullscreen overlay ===== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  background: #0f0f0f;
  z-index: 101;
  padding: 8px;
  overflow-y: auto;
}

.mobile-nav--visible {
  display: block;
}

.mobile-nav__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: 12px;
  color: #f1f1f1;
  font-size: 16px;
  font-weight: 500;
  transition: background 0.2s;
  cursor: pointer;
}

.mobile-nav__item:hover { background: #1a1a1a; }

.mobile-nav__divider {
  height: 1px;
  background: #2a2a2a;
  margin: 4px 0;
}

/* ===== Main layout ===== */
.main {
  padding-top: 80px;
  max-width: 1600px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 48px;
}

/* ===== Video Grid ===== */
.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px 16px;
}

.video-card {
  cursor: pointer;
  display: block;
}

.video-card__thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1a1a;
  margin-bottom: 10px;
}

.video-card__thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.video-card:hover .video-card__thumb-wrap img {
  transform: scale(1.05);
}

.video-card__thumb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.video-card:hover .video-card__thumb-overlay {
  background: rgba(0, 0, 0, 0.35);
}

.video-card__thumb-overlay svg {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
  width: 48px;
  height: 48px;
}

.video-card:hover .video-card__thumb-overlay svg {
  opacity: 1;
  transform: scale(1);
}

.video-card__watched {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(85, 85, 85, 0.75);
  color: #ddd;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  z-index: 2;
}

.video-card__duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.video-card__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  color: #f1f1f1;
}

.video-card__meta {
  font-size: 13px;
  color: #999;
}

/* --- Главная: крупные карточки --- */
.video-grid--main {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.video-grid--main .video-card {
  padding: 10px;
  border-radius: 16px;
  transition: background 0.25s ease;
}

.video-grid--main .video-card:hover {
  background: var(--card-hue-bg, rgba(255, 255, 255, 0.05));
}

.video-grid--main .video-card__thumb-wrap {
  margin-bottom: 12px;
}

.video-grid--main .video-card__title {
  font-size: 16px;
  margin-bottom: 6px;
}

.video-grid--main .video-card__channel-avatar,
.video-grid--main .video-card__channel-letter {
  width: 32px;
  height: 32px;
}

.video-grid--main .video-card__channel-letter {
  font-size: 14px;
}

.video-grid--main .video-card__channel-name {
  font-size: 14px;
}

.video-card__info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
}

.video-card__info-row .video-card__channel {
  margin-top: 0;
  min-width: 0;
}

.video-card__info-row .video-card__channel-name {
  min-width: 0;
}

.video-card__info-row .video-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 13px;
  color: #999;
}

.video-card__meta-dot {
  color: #666;
}

/* ===== Video Page ===== */
.video-page {
  padding-top: 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 48px;
}

.video-player-wrapper {
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  width: 100%;
}

.video-player-wrapper .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease;
}

.video-player-wrapper:hover .play-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.video-player-wrapper .play-overlay svg {
  width: 64px;
  height: 64px;
  opacity: 0.9;
  transition: transform 0.2s ease;
}

.video-player-wrapper:hover .play-overlay svg {
  transform: scale(1.08);
}

.video-player-wrapper .placeholder-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  color: #999;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}

.video-title {
  font-size: 20px;
  font-weight: 700;
  margin: 16px 0 10px;
  line-height: 1.3;
}

.video-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #222;
}

.video-meta-row__info {
  font-size: 14px;
  color: #999;
}

.video-actions {
  display: flex;
  gap: 6px;
}

.action-btn {
  height: 36px;
  padding: 0 14px;
  background: #272727;
  border: none;
  border-radius: 18px;
  color: #f1f1f1;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s;
  white-space: nowrap;
  text-decoration: none;
}

.action-btn:hover { background: #3f3f3f; }

.action-btn svg { flex-shrink: 0; }

.action-dropdown {
  position: relative;
  display: inline-flex;
}

.action-dropdown__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.action-dropdown__menu[hidden] { display: none; }

.action-dropdown__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: none;
  border: none;
  border-radius: 8px;
  color: #f1f1f1;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.2s;
}

.action-dropdown__item:hover { background: #272727; }

.action-dropdown__item svg { flex-shrink: 0; }

.video-description {
  background: #1a1a1a;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.video-description__text {
  font-size: 14px;
  color: #bbb;
  line-height: 1.6;
}

/* ===== Sidebar ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sidebar-card {
  display: flex;
  gap: 8px;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px;
  transition: background 0.2s;
}

.sidebar-card:hover { background: #1a1a1a; }

.sidebar-card__thumb {
  width: 168px;
  min-width: 168px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #1a1a1a;
  position: relative;
}

.sidebar-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-card__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 2px;
}

.sidebar-card__title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  color: #f1f1f1;
}

.sidebar-card__views {
  font-size: 13px;
  color: #999;
}

.sidebar-card__watched {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(85, 85, 85, 0.75);
  color: #ddd;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  z-index: 2;
}

/* ===== Login Page ===== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 32px 24px 28px;
}

.login-card__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.login-card__subtitle {
  text-align: center;
  font-size: 14px;
  color: #999;
  margin-bottom: 28px;
}

.login-card__error {
  background: #2d1b1b;
  border: 1px solid #5c2525;
  color: #ff6b6b;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: none;
}

.login-card__error--visible { display: block; }

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #ccc;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus { border-color: #ff0000; }
.form-group input::placeholder { color: #666; }

/* Password wrapper with eye toggle */
.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 0;
  top: 0;
  height: 44px;
  width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  transition: color 0.2s;
}

.password-toggle:hover { color: #f1f1f1; }

.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  outline: none;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group textarea:focus { border-color: #ff0000; }
.form-group textarea::placeholder { color: #666; }

.form-group select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: #0f0f0f;
  border: 1px solid #333;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-group select:focus { border-color: #ff0000; }

.form-group select option {
  background: #1a1a1a;
  color: #fff;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.btn-primary {
  width: 100%;
  height: 44px;
  background: #ff0000;
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover { background: #cc0000; }

.btn-secondary {
  width: 100%;
  height: 44px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 10px;
  color: #ccc;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-secondary:hover {
  background: #1f1f1f;
  border-color: #555;
}

.login-card__footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: #666;
}

/* ===== Admin Panel ===== */
.admin-page {
  padding-top: 80px;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 48px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-header h1 {
  font-size: 24px;
  font-weight: 700;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.admin-stat {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 16px;
}

.admin-stat__value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.admin-stat__label {
  font-size: 13px;
  color: #999;
}

/* --- Admin table responsive --- */
.admin-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  border: 1px solid #2a2a2a;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #1a1a1a;
  min-width: 600px;
}

.admin-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  text-transform: uppercase;
  color: #999;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #2a2a2a;
  white-space: nowrap;
}

.admin-table td {
  padding: 12px 14px;
  font-size: 14px;
  border-bottom: 1px solid #222;
  color: #ddd;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #222; }

.admin-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.admin-badge--published { background: #0d3b1e; color: #4ade80; }
.admin-badge--public { background: #0d3b1e; color: #4ade80; }
.admin-badge--draft { background: #3b2d0d; color: #fbbf24; }
.admin-badge--private { background: #1a1a3b; color: #818cf8; }

/* ===== Edit Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  width: 100%;
  max-width: 780px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 30px 18px;
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
  border-radius: 16px 16px 0 0;
}

.modal__header h2 {
  font-size: 22px;
  font-weight: 700;
}

.modal__close {
  background: none;
  border: none;
  color: #888;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.modal__close:hover { color: #f1f1f1; background: #2a2a2a; }

.modal__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 32px 32px;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3a transparent;
}

.modal__body .form-group {
  margin-bottom: 24px;
}

.modal__body::-webkit-scrollbar { width: 10px; }
.modal__body::-webkit-scrollbar-track { background: transparent; }
.modal__body::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 10px;
}
.modal__body::-webkit-scrollbar-thumb:hover { background: #4a4a4a; }

.edit-preview {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.thumb-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.thumb-option {
  width: 150px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #333;
  cursor: pointer;
  background: #000;
  transition: border-color 0.2s;
}

.thumb-option:hover { border-color: #666; }
.thumb-option--selected { border-color: #ff0000; }

/* ===== Modal Tabs (segmented control) ===== */
.modal__tabs {
  display: flex;
  gap: 6px;
  padding: 14px 25px;
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
}

.modal__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid #2a2a2a;
  color: #999;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.modal__tab svg { flex-shrink: 0; }

.modal__tab:hover {
  color: #f1f1f1;
  border-color: #3a3a3a;
  background: #242424;
}

.modal__tab--active {
  color: #fff;
  background: #2b2b2b;
  border-color: #3a3a3a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.modal__tab--active svg { color: #ff0000; }

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.stats-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #141414;
  border: 1px solid #242424;
  border-radius: 14px;
  padding: 18px 20px;
}

.stats-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stats-card__icon--views {
  background: rgba(255, 0, 0, 0.1);
  color: #ff0000;
}

.stats-card__icon--downloads {
  background: rgba(0, 150, 255, 0.12);
  color: #3b9dff;
}

.stats-card__value {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  color: #f1f1f1;
}

.stats-card__label {
  font-size: 12.5px;
  color: #888;
  margin-top: 2px;
}

.stats-section {
  background: #141414;
  border: 1px solid #242424;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
}

.stats-section:last-child { margin-bottom: 0; }

.stats-section__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.stats-section__title {
  font-size: 14px;
  font-weight: 700;
  color: #f1f1f1;
}

.stats-section__badge {
  background: #242424;
  color: #bbb;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}

.stats-table-wrap { overflow-x: auto; }

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.stats-table th,
.stats-table td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid #222;
}

.stats-table th:first-child,
.stats-table td:first-child { padding-left: 4px; }

.stats-table th {
  color: #777;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stats-table tr:last-child td { border-bottom: none; }

.stats-table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

.stats-table__ip {
  font-family: 'SFMono-Regular', Consolas, 'Roboto Mono', monospace;
  font-size: 12.5px;
  color: #ccc;
  white-space: nowrap;
}

.stats-table__date {
  color: #888;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .modal__tabs { padding: 0 18px 12px; }
  .modal__tab { padding: 8px 12px; font-size: 12.5px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-card { padding: 14px 16px; }
}

.modal__footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 30px 22px;
  background: #1a1a1a;
  border-top: 1px solid #2a2a2a;
  border-radius: 0 0 16px 16px;
  flex-wrap: wrap;
}

.modal__footer .btn-primary,
.modal__footer .btn-outline,
.modal__footer .btn-danger {
  height: 42px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.modal__footer .btn-primary {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
}

@media (max-width: 560px) {
  .modal { max-height: 92vh; }
  .modal__header { padding: 16px 18px 14px; }
  .modal__body { padding: 18px 18px; }
  .modal__footer { padding: 14px 18px 18px; }
  .modal__footer { flex-direction: column; align-items: stretch; }
  .modal__footer .btn-outline,
  .modal__footer .btn-primary,
  .modal__footer .btn-danger { width: 100%; }
  .thumb-option { width: 120px; }
}

/* ===== Plyr Dark Overrides ===== */
.video-player-wrapper .plyr {
  border-radius: 12px;
  width: 100%;
  height: 100%;
}

.video-player-wrapper .plyr video { object-fit: contain; }
.video-player-wrapper .plyr__poster { background-size: contain; }

.plyr--full-ui input[type=range] { color: #00b2ff; }
.plyr__control--overlaid { background: rgba(255, 255, 255, 0.9); }
.plyr__control--overlaid:hover { background: #ffffff; }
.plyr__control--overlaid svg { fill: #0f0f0f; }
.plyr__control.plyr__control--pressed .icon--pressed,
.plyr__control.plyr__control--pressed .icon--not-pressed { fill: #00b2ff; }
.plyr__menu__container .plyr__control[role=menuitemradio][aria-checked=true]::before { background: #00b2ff; }
.plyr--full-ui .plyr__volume input[type=range] { color: #00b2ff; }
.plyr__progress input[type=range]::-webkit-slider-runnable-track { color: #00b2ff; }
.plyr--full-ui input[type=range]::-webkit-slider-thumb { background: #00b2ff; }
.plyr--full-ui input[type=range]::-moz-range-thumb { background: #00b2ff; }

/* ===== Upload Page ===== */
.upload-page {
  padding-top: 80px;
  max-width: 720px;
  margin: 0 auto;
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: 48px;
}

.upload-page h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.upload-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 24px 20px;
}

.upload-area {
  border: 2px dashed #333;
  border-radius: 12px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 20px;
}

.upload-area:hover {
  border-color: #ff0000;
  background: rgba(255, 0, 0, 0.03);
}

.upload-area__icon { margin-bottom: 10px; }

.upload-area__text {
  font-size: 14px;
  font-weight: 600;
  color: #f1f1f1;
  margin-bottom: 4px;
}

.upload-area__hint {
  font-size: 13px;
  color: #666;
}

.upload-area input[type="file"] { display: none; }

.upload-previews {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.upload-previews__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
  background: #000;
}

.upload-previews__img {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.upload-previews__img:hover {
  border-color: #ff0000;
}

.upload-previews__img--selected {
  border: 2px solid #ff0000;
  box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.3);
}

@media (max-width: 560px) {
  .upload-previews { grid-template-columns: repeat(2, 1fr); }
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.upload-thumb-area {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #0f0f0f;
  border: 1px dashed #444;
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 14px;
  color: #999;
}

.upload-thumb-area:hover {
  border-color: #ff0000;
  background: rgba(255, 0, 0, 0.03);
}

.upload-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.btn-outline {
  height: 44px;
  padding: 0 24px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 10px;
  color: #ccc;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-outline:hover {
  background: #1f1f1f;
  border-color: #555;
}

/* ===== Cookie Consent ===== */
.cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border-top: 1px solid #2a2a2a;
  padding: 14px 16px;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 999;
  flex-wrap: wrap;
}

.cookie-bar--visible { display: flex; }

.cookie-bar__text {
  font-size: 13px;
  color: #bbb;
  line-height: 1.5;
  flex: 1;
  min-width: 200px;
}

.cookie-bar__text a {
  color: #00b2ff;
  text-decoration: underline;
}

.cookie-bar__btn {
  flex-shrink: 0;
  height: 38px;
  padding: 0 20px;
  background: #00b2ff;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.cookie-bar__btn:hover { background: #0099db; }

/* ===== Channel Row ===== */
.video-channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.video-channel-row__avatar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.video-channel-row__avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-channel-row__name {
  font-size: 14px;
  font-weight: 600;
  color: #f1f1f1;
}

/* ===== Toast Notification ===== */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 380px;
  background: #fff;
  color: #000;
  padding: 14px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  margin: 0 auto;
}

.toast--visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.toast__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  color: #666;
  border-radius: 4px;
  transition: background 0.2s;
  flex-shrink: 0;
  margin-left: auto;
}

.toast__close:hover { background: #eee; }

.toast--loading {
  background: #1a1a1a;
  color: #fff;
  font-weight: 500;
}

.toast__spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #ff0000;
  border-radius: 50%;
  animation: toast-spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes toast-spin {
  to { transform: rotate(360deg); }
}

/* ===== Search Results ===== */
.search-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-sort__label {
  font-size: 13px;
  color: #999;
}

.search-sort__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #999;
  padding: 6px 12px;
  border: 1px solid #333;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.search-sort__link:hover {
  background: #1a1a1a;
  color: #f1f1f1;
}

.search-sort__link--active {
  background: #1a1a1a;
  color: #fff;
  border-color: #555;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-card {
  display: flex;
  gap: 16px;
  padding: 8px;
  border-radius: 12px;
  transition: background 0.2s;
  cursor: pointer;
}

.search-card:hover { background: #1a1a1a; }

.search-card__thumb {
  width: 240px;
  min-width: 240px;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #1a1a1a;
  position: relative;
}

.search-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-card__duration {
  position: absolute;
  bottom: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.search-card__info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.search-card__title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  color: #f1f1f1;
}

.search-card__meta {
  font-size: 13px;
  color: #999;
  margin-bottom: 6px;
}

.search-card__desc {
  font-size: 13px;
  color: #777;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== Settings Page ===== */
.settings-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 16px;
}

.settings-page__title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
}

.settings-page__msg {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 20px;
}

.settings-page__msg--error {
  background: #2a0f0f;
  color: #ff6b6b;
  border: 1px solid #441515;
}

.settings-page__msg--success {
  background: #0f2a0f;
  color: #6bff6b;
  border: 1px solid #154415;
}

.settings-section {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.settings-section__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #f1f1f1;
}

.settings-section__info {
  font-size: 14px;
  color: #888;
}

.settings-avatar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.settings-avatar__preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  background: #333;
  flex-shrink: 0;
}

.settings-avatar__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.settings-avatar__letter {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  background: #8b5cf6;
}

.settings-avatar__form {
  display: inline-block;
}

.settings-avatar__btn {
  width: auto;
  padding: 8px 20px;
  height: auto;
  font-size: 14px;
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  background: #441515;
  color: #ff6b6b;
}

.btn-danger:hover {
  background: #5a1a1a;
}

.settings-section .btn-primary {
  margin-top: 8px;
}

.settings-section .form-group {
  margin-bottom: 12px;
}

.settings-section .form-group:last-of-type {
  margin-bottom: 0;
}

/* ===== Footer ===== */
.footer {
  padding: 16px;
  text-align: center;
  font-size: 12px;
  color: #555;
}

/* ============================================================ */
/* ===== RESPONSIVE BREAKPOINTS ===== */
/* ============================================================ */

/* --- Tablet landscape / small desktop --- */
@media (min-width: 1024px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px 18px;
  }

  .video-page {
    grid-template-columns: 1fr 360px;
    padding-left: 24px;
    padding-right: 24px;
    gap: 28px;
  }

  .sidebar-card__thumb {
    width: 200px;
    min-width: 200px;
  }

  .main, .admin-page, .upload-page {
    padding-left: 24px;
    padding-right: 24px;
  }

  .header__inner {
    padding: 0 24px;
  }
}

/* --- Desktop large --- */
@media (min-width: 1280px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px 20px;
  }

  .video-page {
    grid-template-columns: 1fr 420px;
    gap: 32px;
  }

  .sidebar-card__thumb {
    width: 220px;
    min-width: 220px;
  }
}

/* --- Tablet portrait --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px 14px;
  }

  .video-page {
    grid-template-columns: 1fr;
    padding-left: 20px;
    padding-right: 20px;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .sidebar__title {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .sidebar-card {
    flex-direction: column;
  }

  .sidebar-card__thumb {
    width: 100%;
    min-width: 100%;
  }

  .main, .admin-page, .upload-page {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header__inner {
    padding: 0 20px;
  }
}

/* Hide mobile search icon on desktop */
@media (min-width: 768px) {
  .header__icon-btn#searchToggle {
    display: none;
  }
}

/* --- Mobile: < 768px --- */
@media (max-width: 767px) {
  .header {
    height: 56px;
  }

  .header__inner {
    padding: 0 8px;
  }

  .header__logo span {
    display: inline;
    font-size: 16px;
  }

  .header__logo img {
    height: 28px;
  }

  /* Hide desktop search on mobile */
  .header__search {
    display: none;
  }

  .header__menu-toggle {
    display: flex;
  }

  .header__upload-btn {
    display: flex;
  }

  .header__auth-btn span {
    display: none;
  }

  .header__auth-btn {
    padding: 0 12px;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px 10px;
  }

  .video-card__title {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .video-card__meta {
    font-size: 12px;
  }

  .video-grid--main .video-card__title {
    font-size: 13px;
  }

  .video-grid--main .video-card__channel-avatar,
  .video-grid--main .video-card__channel-letter {
    width: 20px;
    height: 20px;
  }

  .video-grid--main .video-card__channel-letter {
    font-size: 11px;
  }

  .video-grid--main .video-card__channel-name {
    font-size: 12px;
  }

  .video-card__info-row {
    flex-wrap: wrap;
    margin-top: 6px;
    gap: 4px 8px;
  }

  .video-card__info-row .video-card__meta {
    font-size: 12px;
  }

  .video-card__thumb-wrap {
    border-radius: 8px;
    margin-bottom: 6px;
  }

  .video-card__watched {
    font-size: 12px;
    padding: 4px 10px;
    top: 6px;
    left: 6px;
  }

  .video-card__duration {
    font-size: 11px;
    bottom: 4px;
    right: 4px;
  }

  .section-title {
    font-size: 18px;
    margin-bottom: 14px;
  }

  .main {
    padding-top: 72px;
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 32px;
  }

  .video-page {
    padding-top: 72px;
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 32px;
    gap: 16px;
  }

  .video-title {
    font-size: 17px;
    margin: 12px 0 8px;
  }

  .video-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .video-actions {
    width: 100%;
  }

.action-btn--liked {
  background: #ff0000;
}

.action-btn--liked:hover {
  background: #cc0000;
}

.action-btn {
    flex: 1;
    justify-content: center;
    height: 40px;
  }

  .video-player-wrapper {
    border-radius: 8px;
  }

  .video-player-wrapper .play-overlay svg {
    width: 56px;
    height: 56px;
  }

  /* Sidebar on mobile */
  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .sidebar__title {
    grid-column: 1 / -1;
    font-size: 16px;
    margin-bottom: 0;
  }

  .sidebar-card {
    flex-direction: column;
    padding: 0;
  }

  .sidebar-card__thumb {
    width: 100%;
    min-width: 100%;
  }

  .sidebar-card__title {
    font-size: 12px;
    -webkit-line-clamp: 2;
  }

  .sidebar-card__watched {
    font-size: 11px;
    padding: 4px 8px;
  }

  .sidebar-card__views {
    font-size: 11px;
  }

  /* Admin mobile */
  .admin-page {
    padding-top: 72px;
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 32px;
  }

  .admin-header h1 {
    font-size: 20px;
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .admin-stat {
    padding: 12px;
  }

  .admin-stat__value {
    font-size: 22px;
  }

  .admin-stat__label {
    font-size: 12px;
  }

  .admin-table-wrap {
    border-radius: 8px;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 10px;
    font-size: 13px;
  }

  /* Upload mobile */
  .upload-page {
    padding-top: 72px;
    padding-left: 8px;
    padding-right: 8px;
    padding-bottom: 32px;
  }

  .upload-page h1 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .upload-card {
    padding: 16px;
    border-radius: 12px;
  }

  .upload-area {
    padding: 28px 16px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .upload-actions {
    flex-direction: column;
  }

  .btn-primary, .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .btn-primary {
    max-width: 100% !important;
  }

  .cookie-bar {
    padding: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-bar__btn {
    width: 100%;
    justify-content: center;
  }

  .search-card {
    flex-direction: column;
  }

  .search-card__thumb {
    width: 100%;
    min-width: 100%;
  }

  .search-card__title {
    font-size: 15px;
  }

  .search-sort {
    gap: 6px;
  }

  .search-sort__link {
    font-size: 12px;
    padding: 5px 10px;
  }

  .toast {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }

  .login-card {
    padding: 24px 20px 24px;
  }

  .login-card__logo {
    font-size: 22px;
  }
}

/* --- Very small mobile: < 420px --- */
@media (max-width: 419px) {
  .video-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: 1fr 1fr;
  }
}

/* ============================================================
   ������ � ��������
   ============================================================ */

.video-card__channel {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 12px;
  color: #888;
  text-decoration: none;
}

.video-card__channel-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.video-card__channel-letter {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2a2a2a;
  color: #f1f1f1;
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.video-card__channel-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-card__channel {
  margin-top: 6px;
}

.channel-page__header {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.channel-page__avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.channel-page__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-page__avatar-letter {
  font-size: 34px;
  color: #f1f1f1;
}

.channel-page__info {
  flex: 1;
  min-width: 200px;
}

.channel-page__name {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
}

.channel-page__desc {
  color: #999;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 6px;
}

.channel-page__meta {
  color: #666;
  font-size: 13px;
}

.channel-page__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: #ff0000;
  color: #fff;
  white-space: nowrap;
}

.sub-btn:hover {
  background: #cc0000;
}

.sub-btn--subscribed {
  background: #3f3f3f;
  color: #f1f1f1;
}

.sub-btn--subscribed:hover {
  background: #555;
}

.sub-btn--sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 8px;
}

.settings-channel {
  display: flex;
  gap: 14px;
  align-items: center;
}

.settings-channel__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.settings-channel__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.settings-channel__letter {
  font-size: 22px;
  color: #f1f1f1;
}

.settings-channel__name {
  font-size: 16px;
  font-weight: 600;
}

.settings-channel__meta {
  font-size: 13px;
  color: #888;
  margin-top: 2px;
}

.settings-channel__meta a {
  text-decoration: none;
}

.channel-avatar-drop {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px dashed #444;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.channel-avatar-drop:hover {
  border-color: #ff0000;
  background: rgba(255, 0, 0, 0.03);
}

.channel-avatar-drop--dragover {
  border-color: #ff0000;
  background: rgba(255, 0, 0, 0.05);
}

.channel-avatar-drop__preview-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-avatar-drop__preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.channel-avatar-drop__letter {
  font-size: 28px;
  color: #f1f1f1;
}

.channel-avatar-drop__content {
  min-width: 0;
}

.channel-avatar-drop__text {
  font-size: 14px;
  font-weight: 600;
  color: #f1f1f1;
  margin-bottom: 4px;
}

.channel-avatar-drop__hint {
  font-size: 12.5px;
  color: #666;
}

.channel-avatar-drop__file {
  font-size: 12.5px;
  color: #4ade80;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.channel-avatar-drop input[type="file"] {
  display: none;
}

.upload-actions .btn-primary,
.upload-actions .btn-outline {
  height: 44px;
}

.video-channel-row__avatar span {
  font-size: 18px;
  color: #f1f1f1;
}

/* ============================================================
   Управление видео на канале
   ============================================================ */

.channel-manage__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.channel-manage__row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 10px;
}

.channel-manage__thumb {
  width: 140px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  background: #222;
}

.channel-manage__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-manage__info {
  flex: 1;
  min-width: 0;
}

.channel-manage__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #f1f1f1;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-manage__title:hover {
  color: #ff0000;
}

.channel-manage__meta {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.channel-manage__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .channel-manage__row {
    flex-wrap: wrap;
  }
  .channel-manage__thumb {
    width: 100px;
    height: 60px;
  }
  .channel-manage__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

.admin-badge--deleted {
  background: rgba(255, 0, 0, 0.15);
  color: #ff6b6b;
}

/* ============================================================
   Настройки канала
   ============================================================ */

.channel-settings__avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #222;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 12px;
}

.channel-settings__avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.channel-settings__avatar-letter {
  font-size: 34px;
  color: #f1f1f1;
}
