* {
  box-sizing: border-box;
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 0;
}
body {
  background: #f4f6f8;
  color: #333;
  display: flex;
  justify-content: center;
  padding: 20px;
}
.container {
  width: 100%;
  max-width: 640px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
h1 {
  margin-bottom: 16px;
  font-size: 1.6rem;
}
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
input,
textarea,
button {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
}
button {
  cursor: pointer;
  background: #0066cc;
  color: #fff;
  border: none;
  font-weight: bold;
}
button:hover:not(:disabled) {
  background: #0052a3;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.post-header {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 4px;
}
.post-title {
  font-size: 1.2rem;
  margin-bottom: 8px;
}
.post-content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.4;
}
.post-image {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-top: 8px;
  display: block;
}
.vote-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.vote-actions button {
  background: #e5e5e5;
  color: #222;
  border: 1px solid #bbb;
  padding: 4px 10px;
}
.vote-actions button:hover {
  background: #d8d8d8;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 6px;
  width: 90%;
  max-width: 380px;
  text-align: center;
}
.modal-content h3 {
  color: #d32f2f;
  margin-bottom: 8px;
}
.modal-content button {
  margin-top: 12px;
  width: 100%;
}
