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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.7;
}

header {
  background: #2c3e50;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
}

header nav a {
  color: #ccc;
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.95rem;
}

header nav a:hover {
  color: white;
}

.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* 記事カード */
.post-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s;
}

.post-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.post-card h2 a {
  color: #2c3e50;
  text-decoration: none;
  font-size: 1.3rem;
}

.post-card h2 a:hover {
  color: #3498db;
}

.post-meta {
  font-size: 0.85rem;
  color: #999;
  margin: 0.4rem 0 0.8rem;
}

.post-excerpt {
  color: #555;
  font-size: 0.95rem;
}

/* 記事詳細 */
.post-detail {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.post-detail h1 {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.post-detail .post-meta {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.post-content {
  white-space: pre-wrap;
  font-size: 1rem;
  color: #444;
}

/* 管理画面フォーム */
.admin-form {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.admin-form h2 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #555;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.7rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3498db;
}

.form-group textarea {
  height: 250px;
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-primary {
  background: #3498db;
  color: white;
}

.btn-primary:hover {
  background: #2980b9;
}

.btn-danger {
  background: #e74c3c;
  color: white;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
}

.btn-danger:hover {
  background: #c0392b;
}

.btn-back {
  color: #3498db;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 1rem;
}

.btn-back:hover {
  text-decoration: underline;
}

/* 管理記事リスト */
.admin-post-list {
  margin-top: 2rem;
}

.admin-post-item {
  background: white;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-post-item span {
  font-size: 1rem;
  color: #2c3e50;
}

.message {
  padding: 0.8rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.message.success {
  background: #d4edda;
  color: #155724;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
}

.loading {
  text-align: center;
  color: #999;
  padding: 2rem;
}

footer {
  text-align: center;
  padding: 2rem;
  color: #aaa;
  font-size: 0.85rem;
}
