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

html {
  overflow-y: scroll; /* Всегда показывать место для скроллбару */
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #ffffff;
  line-height: 1.6;
  color: #333;
  min-width: 320px; /* Минимальная ширина для мобильных */
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    gap: 4px;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--primary-color);
    color: var(--text-color);
    border-color: var(--primary-color);
}

.pagination-dots {
    color: var(--text-secondary);
    padding: 0 8px;
    font-weight: bold;
}

@media (max-width: 600px) {
    .pagination {
        gap: 4px;
        margin: 20px 0;
    }
    
    .pagination-btn {
        min-width: 35px;
        height: 35px;
        padding: 0 8px;
        font-size: 14px;
    }
}

/* Базовые медиа-запросы */
@media (max-width: 1200px) {
  .header-container {
    max-width: 100%;
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 0 15px;
  }

  .logo {
    font-size: 24px;
  }

  .logo img {
    height: 28px;
  }

  .search-container {
    display: none; /* Скрываем десктопный поиск на мобильных */
  }

  .mobile-search-btn {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 10px;
  }

  .logo {
    font-size: 20px;
  }

  .logo img {
    height: 24px;
  }
}

/* Хедер */
.header {
  background-color: #ffffff;
  color: #333;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  border-bottom: 1px solid #e8e8e8;
}
.nturl {
  color: var(--text-primary);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 30px;
}

.logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent-color);
  text-decoration: none;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
}

.logo img {
  height: 32px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-container {
  max-width: 320px;
}

.search-form {
  display: flex;
  position: relative;
  background-color: #ffffff;
  border: 2px solid #f1f2f6;
  border-radius: 30px;
  transition: all 0.3s ease;
  overflow: hidden;
  height: 42px;
}

.search-form:hover {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.search-form:focus-within {
  border-color: #ff4757;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.15);
}

.search-input {
  flex: 1;
  padding: 0 16px;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
  color: #333;
  min-width: 200px;
  height: 100%;
}

.search-input::placeholder {
  color: #999;
  font-weight: 400;
}

.search-submit {
  background-color: #ff4757;
  color: white;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 100%;
}

.search-submit:hover {
  background-color: #ff3742;
}

/* Кнопка входа */
.login-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #ffffff;
  color: #ff4757;
  text-decoration: none;
  border: 2px solid #ff4757;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  white-space: nowrap;
  height: 42px;
}

.login-btn:hover {
  background-color: #ff4757;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.login-btn i {
  font-size: 14px;
}

/* Меню пользователя */
.user-menu {
  position: relative;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #ffffff;
  color: #ff4757;
  border: 2px solid #ff4757;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  height: 42px;
}

.user-btn:hover {
  background-color: #ff4757;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.user-btn i:last-child {
  font-size: 12px;
  transition: transform 0.3s ease;
}

.user-menu.active .user-btn i:last-child {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #f1f2f6;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin-top: 5px;
}

.user-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: #2f3640;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border-bottom: 1px solid #f8f9fa;
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background-color: #f8f9fa;
  color: #ff4757;
}

.dropdown-item i {
  font-size: 14px;
  width: 16px;
}

/* Профиль пользователя */
.profile-info {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}

.profile-avatar {
  flex-shrink: 0;
}

.profile-avatar i {
  font-size: 80px;
  color: #ff4757;
}

.profile-details h3 {
  color: #2f3640;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
}

.profile-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f1f2f6;
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  font-weight: 600;
  color: #747d8c;
  min-width: 140px;
}

.stat-value {
  color: #2f3640;
  font-weight: 600;
  font-size: 13px;
  min-width: 30px;
  text-align: right;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.action-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.action-btn.primary {
  background-color: #ff4757;
  color: white;
}

.action-btn.primary:hover {
  background-color: #ff3742;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.action-btn.danger {
  background-color: #dc3545;
  color: white;
}

.action-btn.danger:hover {
  background-color: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Основной контент */
.main-container {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 30px;
}

.page-title {
  text-align: center;
  margin-bottom: 50px;
  color: #2f3640;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 60px;
}

.video-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #f1f2f6;
  display: flex;
  flex-direction: column;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: #ff4757;
}

.video-thumbnail {
  width: 100%;
  aspect-ratio: 16 / 9 !important;
  background: linear-gradient(135deg, #ff4757, #ff6b7a);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* картинка аккуратно обрезается */
}

.default-thumbnail {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff4757, #ff6b7a);
}

/* Кнопка воспроизведения */
.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 3;
}

.video-card:hover .play-overlay {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Темный оверлей при наведении */
.video-thumbnail::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.video-card:hover .video-thumbnail::before {
  opacity: 1;
}

/* Иконка воспроизведения */
.play-icon {
  font-size: 24px;
  color: white;
  margin-left: 3px; /* Центрируем треугольник */
  z-index: 4;
}

/* Длительность видео */
.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  z-index: 5;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
}

.video-info {
  padding: 4px 5px 10px;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  flex: 1;
}

/* Категории видео на главной странице */
.video-categories {
  margin: 8px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 60px;
  overflow: hidden;
  flex-shrink: 1;
  min-height: 0;
}

.category-tag {
  display: inline-block;
  background: linear-gradient(135deg, #ff4757, #ff6b7a);
  color: white;
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(255, 71, 87, 0.2);
}

.category-tag:hover {
  background: linear-gradient(135deg, #ff3742, #ff5a6e);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 71, 87, 0.3);
  color: white;
}

/* Категории на странице видео */
.video-page-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.video-page-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #ff4757, #ff6b7a);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(255, 71, 87, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.video-page-category-tag:hover {
  background: linear-gradient(135deg, #ff3742, #ff5a6e);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
  color: white;
}

.video-page-category-tag i {
  font-size: 11px;
}

.video-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2f3640;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  max-height: 44px;
  flex-shrink: 0;
}

.video-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
  flex-shrink: 0;
}

.video-date {
  color: #747d8c;
  font-size: 12px;
  font-weight: 500;
}

.video-stats {
  display: flex;
  gap: 16px;
  align-items: center;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #747d8c;
  font-size: 12px;
  font-weight: 500;
}

.stat-item i {
  font-size: 11px;
}

.stat-item.likes {
  color: #ff4757;
}

.stat-item.views {
  color: #5352ed;
}

.stat-item.comments {
  color: #2ed573;
}

/* Сообщение об отсутствии видео */
.no-videos-message {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #f1f2f6;
}

.no-videos-content {
  text-align: center;
  padding: 40px;
}

.no-videos-content h3 {
  font-size: 24px;
  color: #2f3640;
  margin-bottom: 10px;
}

.no-videos-content p {
  color: #747d8c;
  font-size: 16px;
}

/* Футер */
.footer {
  background-color: #ffffff;
  color: #2f3640;
  padding: 30px 0;
  margin-top: 60px;
  border-top: 1px solid #f1f2f6;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-warning {
  text-align: center;
  line-height: 1.5;
  color: #747d8c;
  font-size: 13px;
  margin: 0 auto 25px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #f1f2f6;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-link {
  color: #747d8c;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 16px;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.footer-link:hover {
  color: #ff4757;
  background-color: rgba(255, 71, 87, 0.05);
}

.warning-link {
  color: #ff4757;
}

.warning-link:hover {
  background-color: rgba(255, 71, 87, 0.1);
}

/* Страницы контента */
.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.content-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #f1f2f6;
  overflow: hidden;
  margin-bottom: 40px;
}

.content-section {
  padding: 30px;
  border-bottom: 1px solid #f1f2f6;
}

.content-section:last-child {
  border-bottom: none;
}

.section-title {
  color: #2f3640;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 20px;
  background-color: #ff4757;
  border-radius: 2px;
}

.content-text {
  color: #555;
  line-height: 1.6;
  font-size: 15px;
  margin-bottom: 0;
}

.legal-text {
  font-size: 14px;
  color: #666;
}

.email-link {
  color: #ff4757;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 2px 4px;
  border-radius: 4px;
}

.email-link:hover {
  background-color: rgba(255, 71, 87, 0.1);
  text-decoration: underline;
}

/* Секция предупреждения */
.warning-section {
  background-color: #fff8f0;
  border-left: 4px solid #ff9f43;
}

.warning-box {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  background-color: #fff8f0;
  border-radius: 12px;
  border: 1px solid #ffe4cc;
}

.warning-icon {
  color: #ff9f43;
  font-size: 24px;
  margin-top: 2px;
  flex-shrink: 0;
}

.warning-content {
  flex: 1;
}

.warning-text {
  color: #8b4513;
  font-weight: 500;
  margin: 0;
  line-height: 1.5;
}

/* Секция контактов */
.contact-section {
  background-color: #f8f9fa;
}

.contact-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  border: 1px solid #f1f2f6;
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-item i {
  width: 40px;
  height: 40px;
  background-color: #ff4757;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.contact-info h4 {
  margin: 0 0 5px 0;
  color: #2f3640;
  font-size: 16px;
  font-weight: 600;
}

.contact-info p {
  margin: 0;
  color: #747d8c;
  font-size: 14px;
}

/* Список программ для родителей */
.program-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.program-item {
  display: flex;
  gap: 20px;
  padding: 25px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid #f1f2f6;
  transition: all 0.3s ease;
}

.program-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: #ff4757;
}

.program-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff4757, #ff6b7a);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
}

.program-content {
  flex: 1;
}

.program-title {
  color: #2f3640;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px 0;
}

.program-description {
  color: #555;
  line-height: 1.6;
  margin: 0;
  font-size: 15px;
}

.external-link {
  color: #3742fa;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  padding: 2px 4px;
  border-radius: 4px;
}

.external-link:hover {
  background-color: rgba(55, 66, 250, 0.1);
  text-decoration: underline;
}

.conclusion-section {
  background-color: #f0f8ff;
  border-left: 4px solid #3742fa;
}

/* Тёмная тема: приглушаем заключительный блок и ссылки */
[data-theme="dark"] .conclusion-section {
  background-color: var(--bg-secondary);
  border-left-color: #4c5bd6;
}

[data-theme="dark"] .external-link {
  color: #9aa8ff;
}

[data-theme="dark"] .external-link:hover {
  background-color: rgba(154, 168, 255, 0.12);
  text-decoration: underline;
}

/* Форма обратной связи */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.contact-form .form-group {
  margin-bottom: 25px;
}

.contact-form label {
  display: block;
  margin-bottom: 8px;
  color: #2f3640;
  font-weight: 600;
  font-size: 15px;
}

.contact-form input[type="email"],
.contact-form input[type="text"],
.contact-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #f1f2f6;
  border-radius: 8px;
  font-size: 15px;
  outline: none;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  font-family: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #ff4757;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

/* Captcha */
.captcha-group {
  margin-bottom: 30px;
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.captcha-image {
  border: 2px solid #f1f2f6;
  border-radius: 8px;
  overflow: hidden;
  background: #f8f9fa;
}

.captcha-refresh {
  width: 40px;
  height: 40px;
  border: 2px solid #f1f2f6;
  border-radius: 8px;
  background: #f8f9fa;
  color: #747d8c;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.captcha-refresh:hover {
  border-color: #ff4757;
  color: #ff4757;
  background: #fff;
}

/* Кнопка отправки */
.contact-btn {
  width: 100%;
  padding: 16px 20px;
  background: linear-gradient(135deg, #ff4757, #ff6b7a);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.3);
}

/* Сообщение об успехе */
.success-message {
  background: #d4edda;
  color: #155724;
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid #c3e6cb;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.success-message i {
  color: #28a745;
  font-size: 18px;
}

/* Сообщение об ошибке */
.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 15px 20px;
  border-radius: 8px;
  border: 1px solid #f5c6cb;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}

.error-message i {
  color: #dc3545;
  font-size: 18px;
}

/* Адаптивность для страниц контента */
@media (max-width: 768px) {
  .content-card {
    margin: 0 -10px 40px;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .content-section {
    padding: 20px;
  }

  .section-title {
    font-size: 18px;
  }

  .content-text {
    font-size: 14px;
  }

  .warning-box {
    padding: 15px;
    gap: 12px;
  }

  .warning-icon {
    font-size: 20px;
  }

  .contact-card {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .contact-item {
    padding: 15px;
  }

  .contact-item i {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }

  .program-list {
    gap: 15px;
  }

  .program-item {
    flex-direction: column;
    gap: 15px;
    padding: 20px;
  }

  .program-number {
    width: 35px;
    height: 35px;
    font-size: 16px;
    align-self: flex-start;
  }

  .program-title {
    font-size: 16px;
    margin-bottom: 8px;
  }

  .program-description {
    font-size: 14px;
  }

  .contact-form {
    max-width: 100%;
  }

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

  .contact-form input[type="email"],
  .contact-form input[type="text"],
  .contact-form textarea {
    padding: 10px 12px;
    font-size: 14px;
  }

  .captcha-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .captcha-refresh {
    width: 35px;
    height: 35px;
  }

  .contact-btn {
    padding: 14px 18px;
    font-size: 15px;
  }
}

/* Страница авторизации */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 40px 0;
}

.auth-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid #f1f2f6;
  overflow: hidden;
  width: 100%;
  max-width: 420px;
  position: relative;
}

.auth-tabs {
  display: flex;
  background-color: #f8f9fa;
  border-bottom: 1px solid #e8e8e8;
}

.tab-btn {
  flex: 1;
  padding: 16px 20px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #747d8c;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-btn.active {
  color: #ff4757;
  background-color: white;
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: #ff4757;
}

.tab-btn:hover:not(.active) {
  color: #ff4757;
  background-color: rgba(255, 71, 87, 0.05);
}

.auth-form {
  padding: 40px 30px;
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #2f3640;
  font-size: 24px;
  font-weight: 700;
}

/* Переключатель типа регистрации */
.register-type-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  padding: 0 10px;
}

.switch-btn {
  flex: 1;
  padding: 12px;
  border: 2px solid #f1f2f6;
  border-radius: 12px;
  background: #f8f9fa;
  color: #747d8c;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.switch-btn i {
  font-size: 16px;
}

.switch-btn:hover {
  border-color: #ff4757;
  color: #ff4757;
  background-color: rgba(255, 71, 87, 0.05);
}

.switch-btn.active {
  background-color: #ff4757;
  border-color: #ff4757;
  color: white;
}

/* Формы регистрации */
.register-form {
  display: none;
}

.register-form.active {
  display: block;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #2f3640;
  font-weight: 600;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #f1f2f6;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
}

.form-group input:focus {
  border-color: #ff4757;
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1);
}

.auth-btn {
  width: 100%;
  padding: 16px 20px;
  background-color: #ff4757;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.auth-btn:hover {
  background-color: #ff3742;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.3);
}

/* Стили для чекбокса подтверждения возраста */
.age-checkbox-group {
  margin-bottom: 25px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  position: relative;
  padding: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #2f3640;
}

.checkbox-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 20px;
  width: 20px;
  margin: 0;
  z-index: 1;
}

.checkmark {
  height: 20px;
  width: 20px;
  background-color: #f8f9fa;
  border: 2px solid #f1f2f6;
  border-radius: 6px;
  position: relative;
  flex-shrink: 0;
  transition: all 0.3s ease;
  display: inline-block;
  vertical-align: middle;
  margin-top: 0;
}

.checkbox-label:hover .checkmark {
  border-color: #ff4757;
  background-color: rgba(255, 71, 87, 0.05);
}

.checkbox-label input:checked ~ .checkmark {
  background-color: #ff4757;
  border-color: #ff4757;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-label input:focus ~ .checkmark {
  box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.2);
  outline: none;
}

.checkbox-text {
  flex: 1;
  font-weight: 500;
  color: #2f3640;
  line-height: 1.4;
  padding-top: 0;
}

/* Темная тема — чекбокс 18+ */
[data-theme="dark"] .checkbox-text {
  color: var(--text-primary);
}
[data-theme="dark"] .checkmark {
  background-color: var(--bg-secondary);
  border-color: var(--border-color);
}
[data-theme="dark"] .checkbox-label:hover .checkmark {
  border-color: var(--accent-color);
  background-color: rgba(255, 71, 87, 0.08);
}
[data-theme="dark"] .checkbox-label input:checked ~ .checkmark {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.auth-message {
  background-color: #e8f4f8;
  color: #2c5282;
  padding: 12px 20px;
  margin: 20px 30px 0;
  border-radius: 8px;
  border-left: 4px solid #3182ce;
  font-size: 14px;
}

/* Мобильный поиск */
.mobile-search-btn {
  display: none;
  background: none;
  border: none;
  color: #ff4757;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

.mobile-search-btn:hover {
  background-color: rgba(255, 71, 87, 0.1);
}

.mobile-search {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  z-index: 1000;
}

.mobile-search.active {
  transform: translateY(0);
  display: block;
}

.mobile-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 100%;
}

.mobile-search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #f1f2f6;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  background-color: #f8f9fa;
  min-width: 0;
}

.mobile-search-input:focus {
  border-color: #ff4757;
  background-color: #fff;
}

.mobile-search-submit,
.mobile-search-close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  font-size: 18px;
  color: #ff4757;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.mobile-search-submit:hover,
.mobile-search-close:hover {
  background-color: rgba(255, 71, 87, 0.1);
}

/* Адаптивность */
@media (max-width: 768px) {
  /* Формы авторизации */
  .auth-form {
    padding: 30px 20px;
  }

  .auth-form h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .register-type-switch {
    gap: 8px;
    margin-bottom: 20px;
  }

  .switch-btn {
    padding: 10px;
    font-size: 13px;
  }

  .switch-btn i {
    font-size: 14px;
  }
  /* Футер на мобильных */
  .footer {
    padding: 20px 0;
    margin-top: 40px;
  }

  .footer-warning {
    font-size: 12px;
    padding: 12px;
    margin-bottom: 20px;
    line-height: 1.4;
  }

  .footer-menu {
    gap: 8px;
    padding: 0 10px;
  }

  .footer-link {
    font-size: 12px;
    padding: 5px 10px;
  }
  .header-container {
    flex-direction: row;
    justify-content: space-between;
    padding: 10px 20px;
    position: relative;
  }

  .logo {
    font-size: 24px;
  }

  .header-right {
    flex-direction: row;
    gap: 15px;
    align-items: center;
  }

  .desktop-search {
    display: none;
  }

  .mobile-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .login-btn {
    padding: 8px 16px;
    height: 38px;
    font-size: 13px;
  }

  .login-btn span {
    display: none;
  }

  .user-btn span {
    display: none;
  }

  .user-btn {
    padding: 8px;
    width: 38px;
    justify-content: center;
  }

  .user-dropdown {
    right: 0;
    min-width: 160px;
  }

  .profile-info {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .profile-avatar i {
    font-size: 60px;
  }

  .stat-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 0;
  }

  .stat-label {
    min-width: auto;
  }

  .auth-card {
    margin: 0 20px;
    max-width: none;
  }

  .auth-form {
    padding: 30px 20px;
  }

  .main-container {
    padding: 0 20px;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 20px;
  }

  .footer-container {
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  /* Футер для маленьких экранов */
  .footer {
    padding: 15px 0;
    margin-top: 30px;
  }

  .footer-warning {
    font-size: 11px;
    padding: 10px;
    margin-bottom: 15px;
  }

  .footer-menu {
    gap: 6px;
  }

  .footer-link {
    font-size: 11px;
    padding: 4px 8px;
  }
  .page-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .logo {
    font-size: 26px;
  }

  .header-right {
    gap: 12px;
  }

  .search-form {
    height: 38px;
  }

  .search-input {
    font-size: 14px;
    padding: 0 12px;
    min-width: 160px;
  }

  .search-submit {
    padding: 0 12px;
    font-size: 12px;
    min-width: 38px;
  }

  .search-container {
    max-width: 280px;
  }

  .login-btn {
    height: 38px;
    padding: 0 16px;
  }

  .login-btn {
    font-size: 13px;
    padding: 10px 16px;
  }

  .video-stats {
    gap: 12px;
  }

  .stat-item {
    font-size: 11px;
  }

  .video-info {
    padding: 12px 16px 16px;
    min-height: 110px;
  }

  .auth-container {
    padding: 20px 0;
    min-height: 50vh;
  }

  .tab-btn {
    padding: 12px 16px;
    font-size: 14px;
  }

  .auth-form h2 {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .form-group input {
    padding: 12px 14px;
    font-size: 14px;
  }

  .auth-btn {
    padding: 14px 18px;
    font-size: 14px;
  }
}

/* ===== СИСТЕМА СМЕНЫ ТЕМЫ ===== */

/* CSS переменные для светлой темы */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f2f6;
  --text-primary: #2f3640;
  --text-secondary: #747d8c;
  --text-muted: #999;
  --border-color: #e8e8e8;
  --accent-color: #ff4757;
  --accent-hover: #ff3742;
  --shadow-light: rgba(0, 0, 0, 0.08);
  --shadow-medium: rgba(0, 0, 0, 0.15);
  --shadow-heavy: rgba(0, 0, 0, 0.25);
}

/* Темная тема */
[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #252525;
  --bg-tertiary: #303030;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --text-muted: #888;
  --border-color: #404040;
  --accent-color: #ff4757;
  --accent-hover: #ff3742;
  --shadow-light: rgba(0, 0, 0, 0.2);
  --shadow-medium: rgba(0, 0, 0, 0.4);
  --shadow-heavy: rgba(0, 0, 0, 0.6);
}

/* Кнопка переключения темы */
.theme-toggle-btn {
  position: relative;
  width: 50px;
  height: 42px;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: transparent;
  margin: 0 5px;
}

.theme-toggle-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  border-radius: 25px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(0.9);
}

[data-theme="dark"] .theme-toggle-bg {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.theme-toggle-btn:hover .theme-toggle-bg {
  transform: scale(1);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.3);
}

.theme-toggle-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-icon-light,
.theme-icon-dark {
  position: absolute;
  font-size: 16px;
  color: #ffffff;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-icon-light {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

.theme-icon-dark {
  opacity: 0;
  transform: translateY(20px) rotate(-180deg);
}

[data-theme="dark"] .theme-icon-light {
  opacity: 0;
  transform: translateY(-20px) rotate(180deg);
}

[data-theme="dark"] .theme-icon-dark {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

/* Применение переменных к основным элементам */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.header {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 10px var(--shadow-light);
}

/* Навигационные разделы под шапкой */
.top-sections {
  background: var(--bg-primary);
  border-bottom: none;
  z-index: 100;
}

/* Sticky навигация для мобильных устройств */
@media (max-width: 768px) {
  .top-sections {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  /* Улучшенные стили для темной темы */
  [data-theme="dark"] .top-sections {
    background: rgba(26, 26, 26, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  }
  
  /* Стили при прокрутке */
  .top-sections.scrolled {
    background: var(--bg-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  }
  
  [data-theme="dark"] .top-sections.scrolled {
    background: rgba(26, 26, 26, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  }
  
  /* Добавляем отступ сверху для основного контента */
  .main-container {
    margin-top: 0;
  }
  
  /* Улучшаем контейнер для мобильных */
  .sections-container {
    padding: 12px 20px;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .sections-container::-webkit-scrollbar {
    display: none;
  }
  
  /* Делаем кнопки более удобными для касания */
  .section-item {
    padding: 10px 14px;
    font-size: 13px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
  }
  
  /* Индикация загрузки */
  .section-item.loading {
    opacity: 0.7;
    pointer-events: none;
  }
  
  .section-item.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 480px) {
  .top-sections .sections-container {
    padding: 10px 15px;
    gap: 8px;
  }
  
  .top-sections .section-item {
    padding: 8px 12px;
    font-size: 12px;
    min-height: 36px;
    flex-shrink: 0;
  }
  
  .top-sections .section-item i {
    font-size: 12px;
  }
  
}
.sections-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 30px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sections-container::-webkit-scrollbar {
  display: none;
}
.section-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--bg-primary);
  transition: all 0.25s ease;
  white-space: nowrap;
  font-size: 14px;
  flex-shrink: 0;
}
.section-item i {
  font-size: 14px;
}
.section-item:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: rgba(255, 71, 87, 0.05);
}
.section-item.active {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: rgba(255, 71, 87, 0.08);
}

/* Tabs on videos page */
.tabs-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 10px 0 20px;
  flex-wrap: wrap;
}
.tab-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  transition: all 0.25s ease;
  white-space: nowrap;
  font-size: 14px;
}
.tab-item:hover {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: rgba(255, 71, 87, 0.05);
}
.tab-item.active {
  color: var(--accent-color);
  border-color: var(--accent-color);
  background: rgba(255, 71, 87, 0.08);
}
.section-item.disabled {
  opacity: 0.7;
  cursor: default;
}
.section-item.disabled:hover {
  color: var(--text-secondary);
  border-color: var(--border-color);
  background: var(--bg-primary);
}

.logo {
  color: var(--accent-color);
}

/* Поиск в темной теме */
.search-form {
  background-color: var(--bg-primary);
  border: 2px solid var(--border-color);
}

.search-form:hover,
.search-form:focus-within {
  border-color: var(--accent-color);
}

.search-input {
  color: var(--text-primary);
  background: transparent;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-submit {
  background-color: var(--accent-color);
}

.search-submit:hover {
  background-color: var(--accent-hover);
}

/* Кнопки пользователя */
.login-btn,
.user-btn {
  background-color: var(--bg-primary);
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.login-btn:hover,
.user-btn:hover {
  background-color: var(--accent-color);
  color: #ffffff;
}

.user-dropdown {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 25px var(--shadow-medium);
}

.dropdown-item {
  color: var(--text-primary);
  border-bottom: 1px solid var(--bg-secondary);
}

.dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--accent-color);
}

/* Карточки видео */
.video-card {
  background: var(--bg-primary);
  border: 1px solid rgba(64, 64, 64, 0.3);
  box-shadow: 0 4px 20px var(--shadow-light);
}

.video-card:hover {
  box-shadow: 0 12px 40px var(--shadow-medium);
  border-color: var(--accent-color);
}

.video-title {
  color: var(--text-primary);
}

.video-date {
  color: var(--text-secondary);
}

.stat-item {
  color: var(--text-secondary);
}

.stat-item.likes {
  color: var(--accent-color);
}

/* Основной контент */
.main-container {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.page-title {
  color: var(--text-primary);
}

.no-videos-content h3 {
  color: var(--text-primary);
}

.no-videos-content p {
  color: var(--text-secondary);
}

.no-videos-message {
  background: var(--bg-primary);
  border: 1px solid rgba(64, 64, 64, 0.3);
  box-shadow: 0 4px 20px var(--shadow-light);
}

/* Футер */
.footer {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
}

.footer-warning {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.footer-link {
  color: var(--text-secondary);
}

.footer-link:hover {
  color: var(--accent-color);
  background-color: rgba(255, 71, 87, 0.05);
}

.warning-link {
  color: var(--accent-color);
}

/* Страницы контента */
.content-card {
  background: var(--bg-primary);
  border: 1px solid rgba(64, 64, 64, 0.3);
  box-shadow: 0 4px 20px var(--shadow-light);
}

.content-section {
  border-bottom: 1px solid var(--border-color);
}

.section-title {
  color: var(--text-primary);
}

.section-title::before {
  background-color: var(--accent-color);
}

.content-text {
  color: var(--text-secondary);
}

/* Авторизация */
.auth-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px var(--shadow-medium);
}

.auth-tabs {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--accent-color);
  background-color: var(--bg-primary);
}

.tab-btn.active::after {
  background-color: var(--accent-color);
}

.tab-btn:hover:not(.active) {
  color: var(--accent-color);
  background-color: rgba(255, 71, 87, 0.05);
}

.auth-form h2 {
  color: var(--text-primary);
}

.form-group label {
  color: var(--text-primary);
}

.form-group input {
  border: 2px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.form-group input:focus {
  border-color: var(--accent-color);
  background-color: var(--bg-primary);
}

.switch-btn {
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.switch-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background-color: rgba(255, 71, 87, 0.05);
}

.switch-btn.active {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.error-hint {
  color: #ff4757;
  font-size: 12px;
  margin-top: 5px;
  transition: all 0.3s ease;
}

.auth-btn {
  background-color: var(--accent-color);
}

.auth-btn:hover {
  background-color: var(--accent-hover);
}

/* Мобильный поиск */
.mobile-search {
  background: var(--bg-primary);
  box-shadow: 0 4px 12px var(--shadow-light);
}

.mobile-search-input {
  border: 2px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
}

.mobile-search-input:focus {
  border-color: var(--accent-color);
  background-color: var(--bg-primary);
}

.mobile-search-btn,
.mobile-search-submit,
.mobile-search-close {
  color: var(--accent-color);
}

.mobile-search-btn:hover,
.mobile-search-submit:hover,
.mobile-search-close:hover {
  background-color: rgba(255, 71, 87, 0.1);
}

/* Адаптивность для темной темы */
@media (max-width: 768px) {
  .theme-toggle-btn {
    width: 42px;
    height: 38px;
    margin: 0 3px;
  }

  .theme-icon-light,
  .theme-icon-dark {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .theme-toggle-btn {
    width: 38px;
    height: 34px;
    margin: 0 2px;
  }

  .theme-icon-light,
  .theme-icon-dark {
    font-size: 13px;
  }
}

/* ===== ТЕМНАЯ ТЕМА ДЛЯ СТРАНИЦЫ ПРОСМОТРА ВИДЕО ===== */

/* Заголовок видео */
[data-theme="dark"] .video-title {
  color: var(--text-primary);
}

/* Мета информация видео */
[data-theme="dark"] .video-meta {
  /* Убираем бордер в темной теме, чтобы не было серой полоски */
  border-bottom: none;
}

[data-theme="dark"] .video-stats .stat-item {
  color: var(--text-secondary);
}

[data-theme="dark"] .stat-item.views {
  color: #5352ed;
}

[data-theme="dark"] .stat-item.likes {
  color: var(--accent-color);
}

/* Кнопки действий */
[data-theme="dark"] .action-btn {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

[data-theme="dark"] .action-btn:hover {
  border-color: var(--accent-color);
  color: var(--accent-color);
  background: var(--bg-primary);
}

[data-theme="dark"] .like-btn.liked {
  background: var(--accent-color);
  color: #ffffff;
  border-color: var(--accent-color);
}

/* Описание видео */
[data-theme="dark"] .video-description {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .video-description h3 {
  color: var(--text-primary);
}

[data-theme="dark"] .video-description p {
  color: var(--text-secondary);
}

/* Секция комментариев */
[data-theme="dark"] .comments-section {
  border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .comments-section h3 {
  color: var(--text-primary);
}

/* Форма комментариев */
[data-theme="dark"] .comment-input-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .author-name-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .author-name-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.25);
}

[data-theme="dark"] .login-link-btn {
  background: var(--accent-color);
  color: #ffffff;
}

[data-theme="dark"] .login-link-btn:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

[data-theme="dark"] .user-info {
  background: rgba(255, 71, 87, 0.1);
  border-left: 3px solid var(--accent-color);
}

[data-theme="dark"] .user-info .username {
  color: var(--accent-color);
}

[data-theme="dark"] #commentText {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] #commentText:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.1);
}

[data-theme="dark"] #commentText::placeholder {
  color: var(--text-muted);
}

[data-theme="dark"] .char-counter {
  color: var(--text-muted);
}

[data-theme="dark"] .submit-comment-btn {
  background: var(--accent-color);
}

[data-theme="dark"] .submit-comment-btn:hover {
  background: var(--accent-hover);
}

[data-theme="dark"] .submit-comment-btn:disabled {
  background: #666;
  color: #999;
}

/* Стили для кнопки в состоянии кулдауна */
.submit-comment-btn.cooldown {
  background-color: #6c757d !important;
  color: white !important;
  cursor: not-allowed !important;
  opacity: 0.8 !important;
  transform: none !important;
  box-shadow: none !important;
}

.submit-comment-btn.cooldown:hover {
  background-color: #6c757d !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Стили для кнопки в состоянии кулдауна в темной теме */
[data-theme="dark"] .submit-comment-btn.cooldown {
  background-color: #6c757d !important;
  color: white !important;
  cursor: not-allowed !important;
  opacity: 0.8 !important;
  transform: none !important;
  box-shadow: none !important;
}

[data-theme="dark"] .submit-comment-btn.cooldown:hover {
  background-color: #6c757d !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Модальное окно кулдауна */
.cooldown-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(5px);
  cursor: pointer;
}

.cooldown-modal-content {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 400px;
  width: 90%;
  overflow: hidden;
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cooldown-modal-header {
  background: linear-gradient(135deg, #ff4757, #ff3742);
  color: white;
  padding: 20px;
  text-align: center;
  position: relative;
}

.cooldown-modal-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.cooldown-modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.cooldown-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.cooldown-modal-body {
  padding: 30px 20px;
  text-align: center;
}

.cooldown-icon {
  font-size: 48px;
  color: #ff4757;
  margin-bottom: 20px;
}

.cooldown-message {
  font-size: 16px;
  color: #2f3640;
  margin-bottom: 20px;
  line-height: 1.5;
}

.cooldown-timer {
  font-size: 32px;
  font-weight: 700;
  color: #ff4757;
  margin-bottom: 20px;
  font-family: "Courier New", monospace;
}

.cooldown-progress {
  margin-bottom: 20px;
}

.cooldown-progress-bar {
  width: 100%;
  height: 8px;
  background-color: #f1f2f6;
  border-radius: 4px;
  overflow: hidden;
}

.cooldown-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff4757, #ff3742);
  border-radius: 4px;
  transition: width 1s linear;
  width: 100%;
}

.cooldown-modal-footer {
  padding: 20px;
  text-align: center;
  border-top: 1px solid #f1f2f6;
}

.cooldown-modal-btn {
  background: #ff4757;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.cooldown-modal-btn:hover {
  background: #ff3742;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.3);
}

/* Темная тема для модального окна */
[data-theme="dark"] .cooldown-modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .cooldown-modal-header {
  background: linear-gradient(135deg, #ff4757, #ff3742);
}

[data-theme="dark"] .cooldown-message {
  color: var(--text-primary);
}

[data-theme="dark"] .cooldown-timer {
  color: var(--accent-color);
}

[data-theme="dark"] .cooldown-progress-bar {
  background-color: var(--bg-secondary);
}

[data-theme="dark"] .cooldown-modal-footer {
  border-top-color: var(--border-color);
}

/* Список комментариев */
[data-theme="dark"] .comment-item {
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .comment-author {
  color: var(--text-primary);
}

[data-theme="dark"] .comment-author.registered-author {
  color: var(--accent-color);
}

[data-theme="dark"] .comment-author.guest-author {
  color: #d0d0d0;
}

[data-theme="dark"] .guest-badge {
  background: var(--bg-tertiary);
  color: #d0d0d0;
}

[data-theme="dark"] .comment-time {
  color: #cccccc;
}

[data-theme="dark"] .comment-text {
  color: #e0e0e0;
}

[data-theme="dark"] .load-more-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: #d0d0d0;
}

[data-theme="dark"] .load-more-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-color);
  color: var(--text-primary);
}

/* Связанные видео */
[data-theme="dark"] .related-videos-section h3 {
  color: var(--text-primary);
}

[data-theme="dark"] .related-video-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .related-video-item:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-color);
}

[data-theme="dark"] .related-video-info h4 {
  color: var(--text-primary);
}

[data-theme="dark"] .related-video-stats {
  color: #d0d0d0;
}

[data-theme="dark"] .no-thumbnail {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

/* Контейнер плеера - базовые стили наследуются */

/* Промптер для входа */
[data-theme="dark"] .login-prompt {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

[data-theme="dark"] .login-prompt a {
  color: var(--accent-color);
}

/* Favorite button в темной теме */
[data-theme="dark"] .favorite-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
}

[data-theme="dark"] .favorite-btn:hover {
  background: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.3);
  color: #ffc107;
}

[data-theme="dark"] .favorite-btn.favorited {
  background: linear-gradient(135deg, #ffc107, #ffb300);
  color: white;
  border-color: #ffc107;
}

/* Overlay окончания видео уже имеет темные стили */

/* Контейнер главного видео - стили наследуются */

/* Контейнер страницы просмотра видео */
[data-theme="dark"] .video-player-section {
  background: var(--bg-primary);
}

[data-theme="dark"] .related-videos-section {
  background: var(--bg-primary);
}

/* Тёмная тема: чипы таксономий в правой колонке */
[data-theme="dark"] .chip-category {
  background: rgba(255, 255, 255, 0.08);
  color: #d0d4db;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

[data-theme="dark"] .chip-tag {
  background: rgba(55, 66, 250, 0.12);
  color: #b9c1ff;
  border: 1px solid rgba(55, 66, 250, 0.25);
}

[data-theme="dark"] .side-title {
  color: var(--text-primary);
}

/* Светлая тема: явные цвета для чипов, если стили подключены глобально */
.chip-category {
  background: #eef1f4;
  color: #495057;
  border: 1px solid #dfe3e8;
}
.chip-tag {
  background: #eef0ff;
  color: #3243cc;
  border: 1px solid #d5dbff;
}
.chip:hover {
  filter: brightness(0.98);
}
.chip {
  text-decoration: none;
  display: inline-block;
}

/* Дублируем тёмные цвета на глобальном уровне, если блок рендерится вне inline-стилей */
[data-theme="dark"] .chip-category {
  background: rgba(255, 255, 255, 0.08);
  color: #e0e3ea;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
[data-theme="dark"] .chip-tag {
  background: rgba(55, 66, 250, 0.14);
  color: #c5ccff;
  border: 1px solid rgba(55, 66, 250, 0.28);
}
[data-theme="dark"] .chip:hover {
  filter: brightness(1.1);
}

/* Дополнительные стили для полной совместимости */
[data-theme="dark"] .video-info-section {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Убеждаемся что все текстовые элементы имеют правильный цвет */
[data-theme="dark"] .video-info-section h1,
[data-theme="dark"] .video-info-section h2,
[data-theme="dark"] .video-info-section h3,
[data-theme="dark"] .video-info-section p,
[data-theme="dark"] .video-info-section span {
  color: inherit;
}

/* Темная тема для видеоплеера */
[data-theme="dark"] .video-player {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Контролы плеера в темной теме */
[data-theme="dark"] .modern-btn:hover .btn-bg {
  background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modern-btn:active .btn-bg {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .play-pause-btn .btn-bg {
  background: rgba(255, 71, 87, 0.9);
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

[data-theme="dark"] .play-pause-btn:hover .btn-bg {
  background: #ff4757;
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

/* Адаптивность мобильных устройств для темной темы */
@media (max-width: 768px) {
  [data-theme="dark"] .comment-input-container {
    padding: 12px;
  }

  [data-theme="dark"] .related-video-item {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
  }

  [data-theme="dark"] .related-video-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 71, 87, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  }

  [data-theme="dark"] .related-video-info h4 {
    color: var(--text-primary);
  }

  [data-theme="dark"] .related-video-stats .stat-item {
    color: var(--text-secondary);
  }

  [data-theme="dark"] .related-video-stats .stat-item:hover {
    color: #5352ed;
  }

  [data-theme="dark"] .related-video-stats .stat-item:last-child:hover {
    color: #ff4757;
  }

  /* Стили для значений статистики в темной теме */
  [data-theme="dark"] .stat-value {
    color: var(--text-primary);
    font-weight: 600;
  }

  [data-theme="dark"] .video-duration-badge {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }
}

/* Стили для чекбокса подтверждения возраста */
.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: #ff4757;
}

.checkbox-label {
  font-size: 14px;
  color: #666;
  cursor: pointer;
  line-height: 1.4;
  user-select: none;
}

/* Темная тема для чекбокса */
[data-theme="dark"] .checkbox-label {
  color: #ccc;
}

[data-theme="dark"] .checkbox-group input[type="checkbox"] {
  accent-color: #ff4757;
}

/* ===== АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ ===== */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
  .main-container {
    padding: 0 20px;
    margin: 30px auto;
  }

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

  .page-title {
    font-size: 32px;
    margin-bottom: 40px;
  }

  .sections-container {
    padding: 10px 20px;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .sections-container::-webkit-scrollbar {
    display: none;
  }

  .section-item {
    padding: 8px 12px;
    font-size: 13px;
    flex-shrink: 0;
  }

  .section-item i {
    font-size: 13px;
  }
}

/* Мобильные устройства (480px - 768px) */
@media (max-width: 768px) {
  .main-container {
    padding: 0 15px;
    margin: 20px auto;
  }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
  }

  .page-title {
    font-size: 28px;
    margin-bottom: 30px;
  }

  .sections-container {
    padding: 8px 15px;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .sections-container::-webkit-scrollbar {
    display: none;
  }

  .section-item {
    padding: 8px 10px;
    font-size: 12px;
    gap: 6px;
    flex-shrink: 0;
  }

  .section-item i {
    font-size: 12px;
  }

  .tabs-bar {
    gap: 8px;
    margin: 8px 0 16px;
  }

  .tab-item {
    padding: 8px 12px;
    font-size: 12px;
  }

  .video-card {
    border-radius: 12px;
    display: flex;
    flex-direction: column;
  }

  .video-thumbnail {
    aspect-ratio: 16 / 9;
    height: auto;
    flex-shrink: 0;
  }

  .video-info {
    padding: 12px;
    min-height: 110px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .video-title {
    font-size: 14px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    hyphens: auto;
    min-height: 36px;
    max-height: 36px;
    flex-shrink: 0;
  }

  .video-meta {
    margin-top: auto;
    padding-top: 8px;
    flex-shrink: 0;
  }

  .video-stats {
    font-size: 12px;
    gap: 12px;
  }

  /* Адаптивность для страницы видео */
  .video-page-container {
    flex-direction: column;
    gap: 20px;
  }

  .video-main {
    width: 100%;
  }

  .video-sidebar {
    width: 100%;
  }

  .video-player {
    aspect-ratio: 16/9;
    width: 100%;
  }

  .related-videos {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .related-video-item {
    flex-direction: row;
    gap: 12px;
  }

  .related-video-thumbnail {
    width: 120px;
    height: 80px;
    flex-shrink: 0;
  }

  .related-video-info {
    flex: 1;
    min-width: 0;
  }

  .related-video-info h4 {
    font-size: 13px;
    line-height: 1.3;
  }

  .related-video-stats {
    font-size: 11px;
    gap: 8px;
  }

  /* Адаптивность для комментариев */
  .comments-section {
    margin-top: 20px;
  }

  .comment-item {
    padding: 12px;
    gap: 10px;
  }

  .comment-content {
    font-size: 13px;
  }

  .comment-meta {
    font-size: 11px;
    gap: 8px;
  }

  /* Адаптивность для форм */
  .auth-form {
    padding: 30px 20px;
    margin: 20px;
    border-radius: 12px;
  }

  .auth-form h2 {
    font-size: 20px;
    margin-bottom: 15px;
  }

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

  .form-control {
    padding: 12px 16px;
    font-size: 16px;
  }

  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Адаптивность для админ панели */
  .admin-container {
    padding: 20px 15px;
  }

  .admin-tabs {
    flex-direction: column;
    gap: 8px;
  }

  .admin-tab {
    padding: 10px 16px;
    font-size: 14px;
  }

  .section {
    margin-bottom: 20px;
  }

  .section-header {
    font-size: 18px;
    padding: 12px 16px;
  }

  .section-content {
    padding: 16px;
  }

  .form-row {
    flex-direction: column;
    gap: 15px;
  }

  .form-group {
    width: 100%;
  }
}

/* Маленькие мобильные устройства (до 480px) */
@media (max-width: 480px) {
  .main-container {
    padding: 0 10px;
    margin: 15px auto;
  }

  .video-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 30px;
  }

  .page-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .sections-container {
    padding: 6px 10px;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .sections-container::-webkit-scrollbar {
    display: none;
  }

  .section-item {
    padding: 6px 8px;
    font-size: 11px;
    gap: 4px;
    min-width: 60px;
    flex-shrink: 0;
  }

  .section-item i {
    font-size: 11px;
  }

  .tabs-bar {
    gap: 6px;
    margin: 6px 0 12px;
  }

  .tab-item {
    padding: 6px 10px;
    font-size: 11px;
  }

  .video-card {
    border-radius: 8px;
    display: flex;
    flex-direction: column;
  }

  .video-thumbnail {
    aspect-ratio: 16 / 9;
    height: auto;
    flex-shrink: 0;
  }

  .video-info {
    padding: 10px;
    min-height: 100px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  .video-title {
    font-size: 13px;
    line-height: 1.2;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    hyphens: auto;
    min-height: 31px;
    max-height: 31px;
    flex-shrink: 0;
  }

  .video-meta {
    margin-top: auto;
    padding-top: 6px;
    flex-shrink: 0;
  }

  .video-stats {
    font-size: 11px;
    gap: 10px;
  }

  /* Адаптивность для страницы видео */
  .video-page-container {
    gap: 15px;
  }

  .video-player {
    aspect-ratio: 16/9;
  }

  .related-videos {
    gap: 10px;
  }

  .related-video-item {
    gap: 10px;
  }

  .related-video-thumbnail {
    width: 100px;
    height: 70px;
  }

  .related-video-info h4 {
    font-size: 12px;
    line-height: 1.2;
  }

  .related-video-stats {
    font-size: 10px;
    gap: 6px;
  }

  /* Адаптивность для комментариев */
  .comment-item {
    padding: 10px;
    gap: 8px;
  }

  .comment-content {
    font-size: 12px;
  }

  .comment-meta {
    font-size: 10px;
    gap: 6px;
  }

  /* Адаптивность для форм */
  .auth-form {
    padding: 20px 15px;
    margin: 10px;
    border-radius: 8px;
  }

  .auth-form h2 {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .form-control {
    padding: 10px 14px;
    font-size: 16px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }

  /* Адаптивность для админ панели */
  .admin-container {
    padding: 15px 10px;
  }

  .admin-tab {
    padding: 8px 12px;
    font-size: 13px;
  }

  .section-header {
    font-size: 16px;
    padding: 10px 12px;
  }

  .section-content {
    padding: 12px;
  }

  /* Адаптивность для сеток категорий и моделей */
  .models-grid,
  .photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .category-item,
  .model-item {
    border-radius: 8px;
  }

  .category-cover,
  .model-avatar {
    height: 100px;
  }

  .category-name,
  .model-name {
    font-size: 12px;
    padding: 8px;
  }

  /* Адаптивность для поиска */
  .search-results {
    gap: 12px;
  }

  .search-result-item {
    flex-direction: column;
    gap: 10px;
  }

  .search-result-thumbnail {
    width: 100%;
    height: 120px;
  }

  .search-result-info {
    padding: 10px;
  }

  .search-result-title {
    font-size: 14px;
    line-height: 1.3;
  }

  .search-result-stats {
    font-size: 11px;
    gap: 8px;
  }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

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

  .models-grid,
  .photos-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Улучшения для планшетов в портретной ориентации */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

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

/* Дополнительные улучшения мобильной адаптации */
@media (max-width: 768px) {
  .main-container {
    padding: 0 15px;
    margin: 20px auto;
  }
  
  .video-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
  }
  
  .video-card {
    border-radius: 12px;
    display: flex;
    flex-direction: column;
  }
  
  .video-info {
    padding: 12px;
    min-height: 110px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  .video-title {
    font-size: 14px;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-wrap: break-word;
    hyphens: auto;
    min-height: 36px;
    max-height: 36px;
    flex-shrink: 0;
  }

  .video-meta {
    margin-top: auto;
    padding-top: 8px;
    flex-shrink: 0;
  }
  
  .category-tag {
    font-size: 10px;
    padding: 3px 6px;
  }
  
  .video-page-category-tag {
    font-size: 12px;
    padding: 6px 10px;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 0 10px;
    margin: 15px auto;
  }
  
  .video-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .video-card {
    border-radius: 10px;
    display: flex;
    flex-direction: column;
  }
  
  .video-info {
    padding: 10px;
    min-height: 100px;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  .video-title {
    font-size: 13px;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    line-height: 1.3;
    min-height: 34px;
    max-height: 34px;
    flex-shrink: 0;
  }

  .video-meta {
    margin-top: auto;
    padding-top: 6px;
    flex-shrink: 0;
  }
  
  .category-tag {
    font-size: 9px;
    padding: 2px 5px;
  }
  
  .video-page-category-tag {
    font-size: 11px;
    padding: 5px 8px;
  }
  
  .video-categories {
    gap: 4px;
  }
}
