body {
  font-family: sans-serif;
  background: #f4f4f4;
  margin: 0;
  padding: 20px;
}

.container {
  max-width: 1100px;
  margin: auto;
}

h2 {
  text-align: center;
  margin-bottom: 20px;
}

.controls {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: center;
}

input[type="file"],
input[type="text"] {
  padding: 8px;
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.card {
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  cursor: pointer;
  text-align: center;
}

.card img,
.card video {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card .nome {
  padding: 6px;
  font-size: 13px;
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 8px;
}

.pagination button {
  padding: 6px 12px;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: #0056b3;
}

.pagination button:disabled {
  background: #ccc;
  cursor: default;
}

.pagination button.active {
  background: #0056b3;
  font-weight: bold;
}
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white; /* fundo branco */
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content img,
.modal-content video {
  max-width: 90vw;
  max-height: 90vh;
}

.imagem-wrapper {
  position: relative;
}

.protecao {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
}