* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  background: #f4f5f7;
  min-height: 100vh;
  padding: 40px 16px;
}

.app {
  background: #fff;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  padding: 28px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

h1 {
  font-size: 22px;
  color: #222;
}

.btn {
  display: inline-block;
  padding: 9px 16px;
  border: none;
  border-radius: 8px;
  background: #6a82fb;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover { background: #5a6fe0; }

.btn-secondary {
  background: #eee;
  color: #555;
}

.btn-secondary:hover { background: #ddd; }

#post-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.post-item {
  padding: 14px 16px;
  border: 1px solid #eee;
  border-radius: 10px;
  transition: background 0.15s;
}

.post-item:hover { background: #fafafa; }

.post-title {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
  word-break: break-word;
}

.post-meta {
  font-size: 12px;
  color: #999;
  display: flex;
  gap: 10px;
}

.post-content {
  margin-top: 8px;
  font-size: 14px;
  color: #555;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.delete-btn {
  border: none;
  background: transparent;
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
}

.delete-btn:hover { color: #fc5c7d; }

.empty-msg {
  text-align: center;
  color: #bbb;
  padding: 40px 0;
  font-size: 14px;
}

.error-msg {
  text-align: center;
  color: #fc5c7d;
  padding: 20px 0;
  font-size: 14px;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
}

input[type="text"], textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

input[type="text"]:focus, textarea:focus { border-color: #6a82fb; }

textarea { min-height: 160px; resize: vertical; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}
