.directory-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.directory-header h1 {
  font-size: 22px;
  margin: 0;
  color: #fff;
}

.directory-search {
  display: flex;
  gap: 8px;
}

.directory-search input {
  background: #222;
  border: 1px solid #333;
  color: #fff;
  padding: 8px 10px;
  border-radius: 6px;
  min-width: 220px;
}

.directory-search button {
  background: #333;
  border: 1px solid #444;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

.directory-sort {
  display: flex;
  gap: 6px;
}

.directory-sort a {
  padding: 6px 12px;
  border-radius: 6px;
  background: #222;
  border: 1px solid #333;
  color: #ccc;
  font-size: 13px;
}

.directory-sort a.active {
  background: #f0b400;
  color: #000;
  border-color: #f0b400;
  font-weight: bold;
}

/* Карточки актёров/студий (с фото) */
.grid-profiles {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.profile-card {
  background: #222;
  border: 1px solid #2f2f2f;
  border-radius: 10px;
  overflow: hidden;
  text-align: center;
  transition: transform .2s, box-shadow .2s;
}

.profile-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}

.profile-photo {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #000;
}

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

.profile-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  color: #555;
  background: #1a1a1a;
}

.profile-body {
  padding: 10px;
}

.profile-body h3 {
  font-size: 14px;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-count {
  font-size: 12px;
  color: #999;
}

/* Карточки категорий (без фото) */
.grid-categories {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.category-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #222;
  border: 1px solid #2f2f2f;
  border-left: 4px solid #f0b400;
  border-radius: 8px;
  padding: 14px 16px;
  transition: transform .2s, box-shadow .2s;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}

.category-card h3 {
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-count {
  font-size: 12px;
  color: #000;
  background: #f0b400;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: bold;
  flex-shrink: 0;
}

@media (max-width: 1280px) {
  .grid-profiles { grid-template-columns: repeat(4, 1fr); }
  .grid-categories { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
  .grid-profiles { grid-template-columns: repeat(3, 1fr); }
  .grid-categories { grid-template-columns: repeat(2, 1fr); }
}

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

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

  .directory-search input {
    min-width: 0;
    flex: 1;
  }
}
