:root {
  --bg-main: #000000;
  --bg-card: #101010;
  --bg-input: #1a1a1a;
  --text-main: #e6e6e6;
  --text-secondary: #888888;
  --accent: #00baff;
  --accent-hover: #005f7f;
  --border: #222222;
  --error: #e0245e;
}
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  margin: 0;
}
main {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5vh;
}
.card {
  background: var(--bg-card);
  border-radius: 12px;
  box-shadow: 0 2px 12px #000a;
  padding: 2rem 2rem 1.5rem 2rem;
  margin-bottom: 2rem;
  width: 390px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid var(--border);
}
#app-section { width: 510px; min-width: 320px; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent);
  margin-bottom: 2rem;
}
header h1 { margin: 0; font-size: 2rem; letter-spacing: 2px; }
.logo h1 { font-weight: bold; }
input, textarea {
  background: var(--bg-input);
  color: var(--text-main);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  padding: .7rem;
  margin-bottom: .3rem;
  outline: none;
  transition: border .15s;
}
input:focus, textarea:focus { border-color: var(--accent); }
textarea {
  min-height: 60px;
  max-height: 180px;
  resize: none;
}
button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .8rem;
  font-size: 1.05rem;
  cursor: pointer;
  transition: background .2s;
  margin-right: 0.5rem;
}
button.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
button:hover:not(.secondary) { background: var(--accent-hover); }
#feed { display: flex; flex-direction: column; gap: 1.2rem; }
.post-card {
  background: var(--bg-card);
  border-radius: 8px;
  box-shadow: 0 1px 6px #0007;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
  border: 1px solid var(--border);
}
.post-header {
  font-weight: bold;
  color: var(--accent);
  margin-bottom: .3rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.post-date {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-left: .4rem;
}
.post-content {
  font-size: 1.07rem;
  white-space: pre-line;
  word-break: break-word;
  color: var(--text-main);
}
.post-media {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  background: #000;
  border-radius: 6px;
}
.post-actions {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 0.2rem;
}
.post-actions button {
  background: none;
  color: var(--accent);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  margin-right: 0;
  transition: color .2s;
}
.post-actions button.liked { color: #e0245e; }
.comment-list { margin-top: .6rem; }
.comment {
  border-left: 2px solid var(--accent);
  margin-left: .8rem;
  padding-left: .7rem;
  margin-bottom: .4rem;
  color: var(--text-main);
  font-size: .99rem;
}
.comment .comment-user { font-weight: bold; color: var(--accent); }
.comment .comment-date { color: var(--text-secondary); font-size: .88rem; margin-left: .4rem;}
.profile-avatar { display: flex; align-items: center; gap: 1rem; margin-bottom: .7rem;}
.profile-avatar img { width: 56px; height: 56px; border-radius: 50%; background: #181818; object-fit: cover; border: 2px solid var(--border);}
.profile-avatar input[type="file"] { display: none; }  /* ESCONDE O INPUT PADRÃO */
.profile-avatar .custom-file-label {
  margin-left: 0;
  margin-top: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: #161616;
  color: var(--accent);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: background .15s, border .15s;
}
.profile-avatar .custom-file-label:hover {
  background: #222;
  border-color: var(--accent);
}
.profile-avatar .custom-file-label i {
  font-style: normal;
  font-size: 1.25em;
  color: var(--accent);
}
.loading {
  color: var(--accent);
  text-align: center;
  margin: 2rem 0;
}
footer {
  text-align: center;
  color: var(--text-secondary);
  margin: 2rem 0 1rem 0;
  font-size: .98rem;
}
@media (max-width: 700px) {
  #app-section { width: 98vw; min-width: unset; }
  .card { width: 93vw; }
}

/* ---------- MELHORIA VISUAL DO FORMULÁRIO DE POST ---------- */
#post-form {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-input);
  border-radius: 10px;
  padding: 12px 16px;
  border: 1px solid var(--border);
}

#post-form input[type="file"] {
  display: none;
}

.custom-file-label {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: #161616;
  color: var(--accent);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: background .15s, border .15s;
}
.custom-file-label:hover {
  background: #222;
  border-color: var(--accent);
}
.custom-file-label i {
  font-style: normal;
  font-size: 1.25em;
  color: var(--accent);
}

#post-form .custom-checkbox {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
  position: relative;
}

#post-form .custom-checkbox input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

#post-form .checkmark {
  width: 20px;
  height: 20px;
  background: #161616;
  border: 2px solid var(--border);
  border-radius: 6px;
  display: inline-block;
  transition: border .15s, background .15s;
  position: relative;
}
#post-form .custom-checkbox input[type="checkbox"]:checked + .checkmark {
  background: var(--accent);
  border-color: var(--accent);
}
#post-form .checkmark:after {
  content: "";
  position: absolute;
  display: none;
}
#post-form .custom-checkbox input[type="checkbox"]:checked + .checkmark:after {
  display: block;
}
#post-form .custom-checkbox .checkmark:after {
  left: 5px;
  top: 1px;
  width: 6px;
  height: 12px;
  border: solid #101010;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
  content: "";
  position: absolute;
}

#post-btn {
  margin-left: 8px;
  padding: .8rem 1.5rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: bold;
  letter-spacing: .03em;
  transition: background .18s;
}
#post-btn:hover { background: var(--accent-hover); }

/* Garante espaçamento do textarea */
#post-text {
  margin-top: 12px;
  width: 100%;
}