* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

.navbar {
  background: #1a1a2e;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand a {
  color: #00d4aa;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}

.nav-links a {
  color: #ccc;
  text-decoration: none;
  margin-left: 1.5rem;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: #00d4aa;
}

.container {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

h1 {
  margin-bottom: 0.5rem;
  color: #1a1a2e;
}

.subtitle {
  color: #666;
  margin-bottom: 2rem;
}

.form-container {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  max-width: 400px;
  margin: 2rem auto;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
}

.btn-primary {
  background: #00d4aa;
  color: #1a1a2e;
  font-weight: 600;
}

.btn-primary:hover {
  background: #00b894;
}

.error-message {
  background: #ffe0e0;
  color: #c0392b;
  padding: 0.75rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.form-footer {
  margin-top: 1rem;
  text-align: center;
  color: #666;
}

.form-footer a {
  color: #00d4aa;
}

.posts-grid {
  display: grid;
  gap: 1.5rem;
}

.post-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.post-card h3 a {
  color: #1a1a2e;
  text-decoration: none;
}

.post-card h3 a:hover {
  color: #00d4aa;
}

.post-meta {
  color: #888;
  font-size: 0.85rem;
  margin: 0.5rem 0;
}

.post-detail {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.post-content {
  margin-top: 1rem;
  line-height: 1.8;
}

.comments-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.comment {
  border-bottom: 1px solid #eee;
  padding: 1rem 0;
}

.comment:last-of-type {
  border-bottom: none;
}

.comment-meta {
  font-size: 0.85rem;
  color: #666;
}

.comment-form {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #eee;
}

.search-form {
  margin-bottom: 2rem;
}

.search-form .form-group {
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
}

.search-results-info {
  margin-bottom: 1.5rem;
  color: #666;
}

.output-box {
  margin-top: 2rem;
  background: #1a1a2e;
  color: #00d4aa;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
}

.output-box pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
}

.create-post {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.posts-list {
  margin-top: 2rem;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #888;
  font-size: 0.85rem;
}
