body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #fff7f9;
  color: #222;
}

/* container */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 10px;
}

/* HEADER */
.header {
  background: #fff;
  border-bottom: 2px solid #ff3b7a;
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* верх */
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* логотип */
.logo a {
  font-size: 20px;
  font-weight: bold;
  color: #ff3b7a;
  text-decoration: none;
}

/* меню */
.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu a {
  text-decoration: none;
  color: #333;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
}

.menu a:hover {
  background: #ffe3ec;
  color: #ff3b7a;
}

.menu a.active {
  background: #ff3b7a;
  color: #fff;
}

/* поиск */
.search {
  width: 100%;
}

.search input {
  width: 100%;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-sizing: border-box;
}

/* TITLE */
.title {
  margin: 15px 0;
  font-size: 22px;
}

/* GRID */
.grid {
  display: grid;
  gap: 12px;
}

/* CARD */
.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  transition: 0.2s;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.card:hover {
  transform: translateY(-4px);
}

/* THUMB */
.thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9; /* 🔥 CLS FIX */
  overflow: hidden;
}

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

/* PLAY */
.play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 26px;
  color: #fff;
  opacity: 0;
}

.card:hover .play {
  opacity: 1;
}

/* BADGES */
.time {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: #000;
  color: #fff;
  padding: 2px 6px;
  font-size: 12px;
  border-radius: 5px;
}

.hd {
  position: absolute;
  top: 6px;
  left: 6px;
  background: #ff3b7a;
  color: #fff;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 5px;
}

/* TITLE */
.card-title {
  padding: 8px;
  font-size: 14px;
  color: #222;
}

/* PAGINATION */
.pagination {
  margin: 20px 0;
  text-align: center;
}

.pagination a {
  margin: 0 4px;
  padding: 6px 10px;
  background: #fff;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
}

.pagination a:hover {
  background: #ff3b7a;
  color: #fff;
}

/* ADAPTIVE */
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
}

@media (min-width: 601px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

.pagination ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.pagination li {
  display: inline-block;
}

.pagination a,
.pagination span {
  display: block;
  padding: 6px 10px;
  background: #fff;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
}

.pagination a:hover {
  background: #ff3b7a;
  color: #fff;
}

/* текущая страница */
.pagination .active span {
  background: #ff3b7a;
  color: #fff;
}



/* стрелки */
.pagination .next a,
.pagination .prev a {
  font-weight: bold;
}

.video-page {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.player-box iframe {
  width: 100%;
  height: 100%;
}

.video-info {
  background: #fff;
  padding: 10px;
  border-radius: 10px;
}

.desc {
  margin-bottom: 10px;
}

.meta {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: #777;
}

.tags {
  margin: 10px 0;
}

.tags a {
  display: inline-block;
  margin: 3px;
  padding: 4px 8px;
  background: #ffe3ec;
  border-radius: 6px;
  text-decoration: none;
  color: #ff3b7a;
}

.btn-download {
  display: inline-block;
  padding: 8px 12px;
  background: #ff3b7a;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}

.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

/* база */
.meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f3f3f3;
}

/* акценты */
.meta-time {
  background: #fff4cc;
  color: #d9a400;
}

.meta-views {
  background: #ffe3ec;
  color: #ff3b7a;
}

/* иконки */
.meta svg {
  opacity: 0.9;
}

.footer {
  background: #fff;
  border-top: 2px solid #ff3b7a;
  margin-top: 30px;
}

.footer-inner {
  text-align: center;
  padding: 20px 10px;
}

.footer-text {
  font-size: 16px;
  color: #ff3b7a;
  margin-bottom: 10px;
}

.footer-links a {
  color: #555;
  text-decoration: none;
  display: inline-block;
  margin: 5px 0;
}

.footer-links a:hover {
  color: #ff3b7a;
}

.footer-copy {
  font-size: 12px;
  color: #777;
  margin-top: 10px;
  line-height: 1.5;
}

/* === DESKTOP UPGRADE === */
@media (min-width: 1024px) {

  /* контейнер шире и с воздухом */
  .container {
    max-width: 1320px;
    padding: 20px;
  }

  /* заголовок */
  .title {
    font-size: 26px;
    margin-bottom: 20px;
  }

  /* карточки — объём */
  .card {
    border-radius: 14px;
    overflow: hidden;
    transition: 0.25s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  }

  .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
  }

  /* превью */
  .thumb {
    border-bottom: 1px solid #eee;
  }

  .thumb img {
    transition: 0.35s;
  }

  .card:hover .thumb img {
    transform: scale(1.07);
  }

  /* название */
  .card-title {
    font-size: 15px;
    padding: 10px 12px;
    line-height: 1.4;
  }

  /* сетка шире */
  .grid {
    gap: 16px;
  }

  /* HEADER — солиднее */
  .header {
    border-bottom: 2px solid #ff3b7a;
    background: #fff;
  }

  .header-inner {
    padding: 10px 0;
  }

  .logo a {
    font-size: 22px;
  }

  /* меню */
  .menu a {
    padding: 8px 12px;
    font-size: 15px;
  }

  /* поиск */
  .search input {
    max-width: 400px;
    border-radius: 10px;
    padding: 8px 12px;
  }

  /* PLAYER */
  .player-box {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  }

  /* инфо блок */
  .video-info {
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  }

}

/* категории */
.categories-grid {
  display: grid;
  gap: 10px;
}

/* карточка категории */
.category-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
  color: #222;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: 0.2s;
}

.category-card:hover {
  transform: translateY(-2px);
  background: #ffe3ec;
  color: #ff3b7a;
}

/* название */
.category-name {
  font-size: 14px;
}

/* количество */
.category-count {
  background: #ff3b7a;
  color: #fff;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 12px;
}

/* адаптив */
@media (max-width: 600px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 601px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* переключатели */
.top-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 14px;
}

.top-controls label {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

/* избранное */
.favorite {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
}

.favorite.active {
  background: #ff3b7a;
}

/* теги */
.tags-grid {
  display: grid;
  gap: 10px;
}

/* карточка */
.tag-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #fff;
  border-radius: 10px;
  text-decoration: none;
  color: #222;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: 0.2s;
}

.tag-card:hover {
  background: #ffe3ec;
  color: #ff3b7a;
}

/* название */
.tag-name {
  font-size: 14px;
}

/* счётчик */
.tag-count {
  background: #ff3b7a;
  color: #fff;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 12px;
}

/* адаптив */
@media (max-width: 600px) {
  .tags-grid { grid-template-columns: 1fr; }
}

@media (min-width: 601px) {
  .tags-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .tags-grid { grid-template-columns: repeat(4, 1fr); }
}

.empty {
  text-align: center;
  margin: 20px 0;
  color: #777;
}

/* избранное крестик/сердце */
.favorite {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  cursor: pointer;
}

.favorite.active {
  background: #ff3b7a;
}

/* === VIDEO PAGE === */
.video-page {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* PLAYER */
.player-box {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.player-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* INFO BLOCK */
.video-info {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
}

/* DESCRIPTION */
.desc {
  margin-bottom: 10px;
  line-height: 1.4;
}

/* META */
.meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  margin-bottom: 10px;
}

.meta span {
  background: #f3f3f3;
  padding: 4px 8px;
  border-radius: 6px;
}

.meta-time {
  background: #fff4cc;
  color: #caa200;
}

.meta-views {
  background: #ffe3ec;
  color: #ff3b7a;
}

/* SECTIONS (категории / теги) */
.video-section {
  margin-top: 10px;
}

.video-section-title {
  font-size: 13px;
  color: #777;
  margin-bottom: 5px;
}

/* TAGS */
.tag {
  display: inline-block;
  margin: 3px;
  padding: 4px 8px;
  background: #f3f3f3;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-size: 13px;
  transition: 0.2s;
}

.tag:hover {
  background: #ffe3ec;
  color: #ff3b7a;
}

/* DOWNLOAD */
.btn-download {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 12px;
  background: #ff3b7a;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  transition: 0.2s;
}

.btn-download:hover {
  background: #e12f6a;
}

/* === DESKTOP UPGRADE === */
@media (min-width: 1024px) {

  .video-page {
    flex-direction: row;
    align-items: flex-start;
  }

  .player-box {
    width: 70%;
  }

  .video-info {
    width: 30%;
    position: sticky;
    top: 10px;
  }

}

/* === HEADER PRO === */
.header-pro {
  background: #fff;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  border-bottom: 2px solid #ff3b7a;
}

/* контейнер */
.header-pro .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 15px;
}

/* верхняя линия */
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

/* логотип */
.logo a {
  font-size: 26px;
  font-weight: 800;
  color: #ff3b7a;
  text-decoration: none;
}

/* === ПОИСК === */
.search-pro {
  display: flex;
  flex: 1;
  max-width: 600px;
  background: #f5f5f5;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.search-pro input {
  flex: 1;
  border: none;
  padding: 10px 12px;
  background: transparent;
  outline: none;
}

.search-pro button {
  background: linear-gradient(45deg, #ff3b7a, #ff7aa5);
  border: none;
  padding: 0 15px;
  color: #fff;
  cursor: pointer;
}

/* === МЕНЮ === */
.menu-pro {
  display: flex;
  gap: 25px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

/* пункты */
.menu-pro a {
  text-decoration: none;
  color: #444;
  font-weight: 600;
  font-size: 14px;
  position: relative;
  padding: 5px 0;
}

/* hover эффект */
.menu-pro a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background: #ff3b7a;
  transition: 0.3s;
}

.menu-pro a:hover::after {
  width: 100%;
}

.menu-pro a:hover {
  color: #ff3b7a;
}

@media (max-width: 768px){

  .header-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-pro {
    max-width: 100%;
  }

  .menu-pro {
    overflow-x: auto;
    gap: 15px;
  }

}

.player-box video {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: #000;
}

/* УБИРАЕМ СТАНДАРТНОЕ ПОДЧЕРКИВАНИЕ */
.card a {
  text-decoration: none;
  color: inherit;
}

/* НАЗВАНИЕ ВИДЕО */
.card-title {
  font-size: 14px;
  line-height: 1.4;
  color: #222;
  margin-top: 8px;

  /* аккуратное ограничение в 2 строки */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ХОВЕР (как у норм сайтов) */
.card:hover .card-title {
  color: #ff3b7a;
}

/* КАРТОЧКА */
.card {
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* ЧТОБ ССЫЛКА НЕ БЫЛА СИНЕЙ В ЛЮБОМ СОСТОЯНИИ */
.card a:visited,
.card a:active,
.card a:focus {
  color: inherit;
}

.seo-text {
  margin-top: 40px;
  padding: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #555;
  background: #fafafa;
  border-radius: 10px;
}