.sns-main {
  padding-top: 80px;
  padding-bottom: 100px;
  min-height: 100vh;
  background: #f8f9fa;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.sns-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
  background: #f8f9fa;
  min-height: 100vh;
}

.sns-header {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #2d5a27 0%, #7fb069 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.header-text h1 {
  margin: 0;
  color: #2d5a27;
  font-size: 1.8rem;
  font-weight: 700;
}

.header-text p {
  margin: 0.5rem 0 0 0;
  color: #6b7280;
  font-size: 1rem;
}

.sns-header h1 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.sns-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* 投稿作成セクション */
.create-post-section {
  margin-bottom: 2rem;
}

.post-creation {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.post-input-area {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.user-avatar-placeholder {
  width: 40px;
  height: 40px;
  background: #2d5a27;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.create-post-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.create-post-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.create-post-btn {
  flex: 1;
  background: #f3f4f6;
  border: none;
  border-radius: 25px;
  padding: 12px 20px;
  text-align: left;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s ease;
}

.create-post-btn:hover {
  background: #e5e7eb;
}

.create-post-actions {
  display: flex;
  gap: 1rem;
  justify-content: space-around;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.action-btn:hover {
  background: #f3f4f6;
  color: #2d5a27;
}

/* カテゴリタブ */
.category-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding: 0 1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 500;
}

.category-btn:hover {
  border-color: #2d5a27;
  background: #f0f9ff;
}

.category-btn.active {
  background: #2d5a27;
  border-color: #2d5a27;
  color: white;
}

/* フィルター */
.sns-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1rem;
}

.filter-tabs {
  display: flex;
  gap: 0.5rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: all 0.2s;
  cursor: pointer;
}

.tab-btn:hover {
  border-color: #2d5a27;
  background: #f0f9ff;
}

.tab-btn.active {
  background: #2d5a27;
  border-color: #2d5a27;
  color: white;
}

.filter-select {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* 投稿一覧 */
.posts-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.post-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.post-avatar {
  width: 40px;
  height: 40px;
  background: #2d5a27;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.post-info {
  flex: 1;
}

.post-author {
  font-weight: 600;
  color: #1f2937;
  display: block;
  margin-bottom: 0.25rem;
}

.post-date {
  font-size: 0.8rem;
  color: #6b7280;
}

.post-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

.post-body {
  margin-bottom: 1rem;
}

.post-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.post-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.4;
}

.post-text {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4a5568;
}

.post-image {
  width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.sdg-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.75rem 0;
}

.sdg-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
}

.sdg-tag:hover {
  transform: scale(1.1);
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f3f4;
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: #7f8c8d;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.post-action-btn:hover {
  background: #f8f9fa;
  color: #2c3e50;
}

.post-action-btn.liked {
  color: #e74c3c;
}

/* カテゴリ別スタイル */
.sharing-post {
  border-left: 4px solid #10b981;
}

.sharing-category {
  background: #d1fae5;
  color: #065f46;
}

.feedback-section {
  margin: 1rem 0;
  padding: 1rem;
  background: #f0fdf4;
  border-radius: 12px;
}

.feedback-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.feedback-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.feedback-btn:hover {
  background: #f3f4f6;
  border-color: #10b981;
}

.feedback-btn.active {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.honesty-post {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.honesty-category {
  background: #fef3c7;
  color: #92400e;
}

.post-avatar.anonymous {
  background: #f59e0b;
}

.topic-title {
  font-size: 0.9rem;
  color: #92400e;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.vote-section {
  margin: 1rem 0;
  text-align: center;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: white;
  border: 2px solid #f59e0b;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #f59e0b;
  cursor: pointer;
  transition: all 0.2s;
}

.vote-btn:hover {
  background: #f59e0b;
  color: white;
}

.vote-btn.voted {
  background: #f59e0b;
  color: white;
}

.vote-count {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.news-post {
  border-left: 4px solid #3b82f6;
}

.news-category {
  background: #dbeafe;
  color: #1e40af;
}

.post-avatar.official {
  background: #3b82f6;
}

.official-badge::after {
  content: "✓";
  display: inline-block;
  margin-left: 0.5rem;
  color: #3b82f6;
  font-weight: bold;
}

.news-source {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #3b82f6;
  text-decoration: none;
  font-size: 0.9rem;
  margin: 0.5rem 0;
  padding: 0.5rem 1rem;
  border: 1px solid #3b82f6;
  border-radius: 20px;
  transition: all 0.2s;
}

.news-source:hover {
  background: #3b82f6;
  color: white;
}

.discussion-post {
  border-left: 4px solid #8b5cf6;
}

.discussion-category {
  background: #ede9fe;
  color: #5b21b6;
}

.post-avatar.moderator {
  background: #8b5cf6;
}

.moderator-badge::after {
  content: "運営";
  display: inline-block;
  margin-left: 0.5rem;
  background: #8b5cf6;
  color: white;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
}

.discussion-info {
  background: #f5f3ff;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
}

.discussion-date,
.discussion-participants {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #5b21b6;
}

.participants-preview {
  margin-top: 1rem;
}

.participants-preview h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: #374151;
}

.participants-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.participant-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  background: white;
  border-radius: 8px;
}

.participant-avatar {
  width: 32px;
  height: 32px;
  background: #8b5cf6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
}

.participant-info {
  flex: 1;
}

.participant-name {
  font-weight: 500;
  color: #374151;
  display: block;
}

.participant-type {
  font-size: 0.8rem;
  color: #6b7280;
}

.more-participants {
  text-align: center;
  color: #6b7280;
  font-size: 0.85rem;
  padding: 0.5rem;
}

.discussion-actions {
  margin: 1rem 0;
  text-align: center;
}

.join-discussion-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #8b5cf6;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.join-discussion-btn:hover {
  background: #7c3aed;
  transform: translateY(-1px);
}

/* 読み込み・空メッセージ */
.loading-message {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.loading-message i {
  font-size: 2rem;
  margin-bottom: 1rem;
  display: block;
}

.empty-message {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
}

.empty-message i {
  font-size: 3rem;
  opacity: 0.4;
  margin-bottom: 1rem;
  display: block;
}

/* モーダル */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: #1f2937;
}

.close {
  font-size: 1.5rem;
  cursor: pointer;
  color: #6b7280;
  background: none;
  border: none;
  padding: 0.5rem;
}

.close:hover {
  color: #1f2937;
}

.modal-body {
  padding: 1.5rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #1f2937;
}

.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2d5a27;
  box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: #2d5a27;
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: #1e3a1a;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
  transform: translateY(-1px);
}

/* 通知 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-left: 4px solid #2d5a27;
  z-index: 2000;
  animation: slideIn 0.3s ease-out;
}

.notification.success {
  border-left-color: #10b981;
}

.notification.warning {
  border-left-color: #f59e0b;
}

.notification.error {
  border-left-color: #ef4444;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* レスポンシブ */
@media (max-width: 768px) {
  .sns-main {
    padding-top: 70px;
  }

  .container {
    padding: 0 1rem;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  .header-text h1 {
    font-size: 1.5rem;
  }

  .header-text p {
    font-size: 1rem;
  }

  .create-post-actions {
    flex-wrap: wrap;
  }

  .category-tabs {
    padding: 0 1rem;
  }

  .sns-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }

  .filter-tabs {
    justify-content: center;
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .modal-header,
  .modal-body {
    padding: 1rem;
  }

  .feedback-buttons {
    justify-content: center;
  }

  .feedback-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}
