.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
}

.modal.visible {
  display: flex;
}

.modal-content {
  background: #1a1a1a;
  border: 1px solid #3f3f3f;
  border-radius: 8px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
}

.modal-content h3 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #f1f1f1;
}

.modal-content p {
  color: #aaa;
  font-size: 14px;
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.media-modal-content {
  max-width: 90vw;
  max-height: none;
  width: auto;
  display: flex;
  flex-direction: column;
  margin-top: 0;
}

.media-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.media-modal-header h3 {
  margin: 0;
}

.close-btn {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.close-btn:hover {
  background: #3f3f3f;
  color: #fff;
}

.media-modal-body {
  display: column;
  column-count: 3;
  column-gap: 16px;
  padding: 4px;
}

.media-modal-item {
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
  display: inline-block;
  margin-bottom: 16px;
  break-inside: avoid;
}

.media-modal-item img,
.media-modal-item video {
  width: 100%;
  height: auto;
  display: block;
}
