/* Reset e básico */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Arial', sans-serif;
  background-color: #f0f2f5;
  color: #333;
  padding: 20px;
}

main {
  max-width: 700px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  color: #0077b6;
  margin-bottom: 20px;
}

/* Formulário */
form {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.input-group {
  position: relative;
  display: flex;
  flex-direction: column;
}

input[type="text"], textarea {
  padding: 12px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  width: 100%;
  resize: none;
}

#charCount {
  position: absolute;
  right: 10px;
  bottom: 5px;
  font-size: 0.8rem;
  color: #555;
}

button {
  padding: 12px;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  background-color: #0077b6;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background-color: #023e8a;
}

/* Feed de Postagens */
.post-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Card de Postagens */
.post-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Header com avatar */
.post-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
}

.post-card h2 {
  color: #023e8a;
  font-size: 1.2rem;
}

.post-meta {
  font-size: 0.8rem;
  color: #777;
  margin-bottom: 10px;
}

.post-card p {
  margin-bottom: 10px;
  white-space: pre-line;
  line-height: 1.4;
}

/* Ações */
.post-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.post-actions button {
  background: none;
  border: none;
  color: #0077b6;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

.post-actions button:hover {
  background: rgba(0, 119, 182, 0.1);
}

/* Comentários */
.comment-section {
  margin-top: 10px;
  border-top: 1px solid #ccc;
  padding-top: 10px;
}

.comment {
  font-size: 0.9rem;
  padding: 6px;
  margin-bottom: 5px;
  background-color: #f5f5f5;
  border-radius: 6px;
}

.comment span {
  font-weight: bold;
}

/* Responsivo */
@media (max-width: 600px) {
  body {
    padding: 10px;
  }

  .post-card {
    padding: 15px;
  }

  button {
    font-size: 0.9rem;
  }
}