<style>
/* === ESTILO GLOBAL === */
body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background-color: #f5f7fb;
  color: #333;
  margin: 0;
  padding: 0;
}

h2 {
  color: #0d47a1;
  margin-top: 25px;
  border-bottom: 1px solid #c5cae9;
  padding-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding: 8px;
  border-radius: 6px;
  background-color: #e3f2fd;
  color: #0d47a1;
  margin-top: 10px;
}

button {
  background-color: #1565c0;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #0d47a1;
}

input[type="text"], input[type="number"], select {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px;
  width: 100%;
  box-sizing: border-box;
}

form.inline {
  display: inline;
}

details {
  background: #e3f2fd;
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 5px;
}

summary::-webkit-details-marker {
  display: none;
}

/* === GRUPOS DE TVS === */
.grid-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.card-group {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 15px;
  text-align: center;
  transition: 0.3s;
  width: 100%;
  min-height: 200px;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-group:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* === PUBLICAÇÕES (VISUAL IDÊNTICO AOS GRUPOS) === */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 15px;
  justify-content: flex-start;
}

.card.publication {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  padding: 10px;
  text-align: center;
  transition: 0.3s;
  width: 240px;            /* 🔹 Largura igual aos grupos */
  min-height: 200px;       /* 🔹 Altura idêntica */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.card.publication:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.card.publication img,
.card.publication video {
  width: 100%;
  height: 120px;
  border-radius: 6px;
  object-fit: contain;     /* 🔹 Evita distorção */
  background: #000;
}

/* === BOTÕES NAS PUBLICAÇÕES === */
.card.publication .actions {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 8px;
}

.card.publication button {
  font-size: 12px;
  padding: 4px 8px;
}

.card.publication span {
  font-size: 11px;
  color: #555;
}

/* === UPLOAD === */
.upload-form {
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  margin-top: 20px;
}

.upload-form label {
  font-weight: 500;
  color: #0d47a1;
  margin-bottom: 5px;
  display: block;
}

/* === MENU SUPERIOR === */
.navbar {
  background: #0d47a1;
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar h1 {
  font-size: 20px;
  font-weight: 600;
}

.navbar a {
  color: white;
  text-decoration: none;
  margin-left: 15px;
  font-size: 14px;
}

.navbar a:hover {
  text-decoration: underline;
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
  .grid, .grid-groups {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
  }

  .card-group, .card.publication {
    width: 100%;
    min-height: 180px;
  }

  button {
    padding: 5px 8px;
    font-size: 13px;
  }
}
</style>
