.main-categories-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--text-secondary);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-left: 3px solid var(--accent-red);
  padding-left: 10px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 10px;
}

.category-card {
  background: linear-gradient(145deg, #120808 0%, #080404 100%);
  border: 1px solid var(--bg-card-border);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.category-card:active {
  transform: scale(0.96);
}

.category-card.active {
  background: var(--accent-gradient);
  border-color: var(--accent-red);
  box-shadow: 0 4px 18px var(--accent-glow);
}

.category-icon {
  width: 22px;
  height: 22px;
  fill: var(--accent-red);
}

.category-card.active .category-icon {
  fill: #ffffff;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.media-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  cursor: pointer;
}

.media-card video, .media-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-actions {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--bg-card-border);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.action-btn.add-btn {
  background: var(--accent-gradient);
  border: none;
  font-weight: 900;
}

.category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--bg-card-border);
  color: var(--accent-red);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.media-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.media-modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  background: #000;
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(220, 38, 38, 0.3);
  display: flex;
  flex-direction: column;
}

.modal-media-box {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  background: #000;
}

.modal-controls {
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border-top: 1px solid var(--bg-card-border);
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--bg-card-border);
  color: #fff;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 2001;
}
