.main-content {
  display: flex; /* 2カラムレイアウトを作成 */
  justify-content: space-around; /* 中央揃え */
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.container {
  flex: 0 0 50%; /* 幅を60%に設定 */
  max-width: 50%;
  margin: 0;
  margin-left: 12.5%;
  background-color: white;
  padding: 1rem;
}

.side {
  flex: 0 0 20%; /* 幅を20%に設定 */
  max-width: 20%;
  background-color: #faf3e9; /* サイドの背景色 */
  margin-right: 12.5%;
}

.white {
  background-color: white;
  padding: 1rem;
}








.thread-detail {
  margin: auto;
}

.thread-header {
  display: flex;
  align-items: stretch; /* コンテナ内のアイテムを全て高さを揃える */
  margin-bottom: 20px;
}

.thread-image {
  width: 8vw;
  height: 8vw;
  border-radius: 4px;
  margin-right: 20px;
  margin-left: 0;
}

.thread-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}


.thread-header-content {
  /* flex: 1; */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* 要素間にスペースを作り、タイトルを上、メタ情報を下に配置 */
}



.thread-title {
  font-size: 1.5rem;
  color: #6c757d;
  margin-bottom: 10px;
  font-weight: bold;
  margin-top: 0;
}

.thread-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  color: #6c757d;
  font-size: 0.9rem;
  
}


.comment-post-button {
  background-color: #A1D6B2;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-left: auto;
  justify-content: flex-end;
}

.comment-post-button:hover {
  background-color: #8bc59b;
}



.thread-content-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.thread-content-header .thread-user {
    font-weight: bold;
    margin-right: 10px;
}

.thread-content-header .thread-id,
.thread-content-header .thread-date {
    margin-right: 10px;
    color: #6c757d;
    /* font-weight: bold; */
    font-size: 1rem;
}




.thread-content {
  color: #A1D6B2;
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 10px;
  margin-top: 10px;


  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  
}


.citation-box {
  background-color: #f9f9f9;
  border-left: 4px solid #A1D6B2;
  padding: 10px;
  margin: 20px 0;
  margin-top: 30px;
  border-radius: 4px;
}


.citation-image {
  width: 100px;
  height: 100px;
}


.citation-title {
  font-size: 1.2rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.citation-description {
  font-size: 1rem;
  color: #6c757d;
}

.citation-link {
  font-size: 0.9rem;
  color: #A1D6B2;
  text-decoration: none;
}

.citation-link:hover {
  text-decoration: underline;
}

.comments {
  list-style: none;
  padding: 0;
}


/* 各コメント */

.comment-item {
  /* background-color: #f9f9f9; */
  /* padding: 15px; */
  margin-bottom: 10px;
  /* border: 1px solid #d3e0dc;
  border-radius: 2px; */
  position: relative;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 10px;
}





.comment-user {
  /* font-weight: bold; */
  margin-right: 10px;
}

.comment-date {
  margin-right: 10px;
}

.comment-tag {
  background-color: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 10px;
}


.comment-tag {
  background-color: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 10px;
}

/* LGBTQ+のタグ色を設定する */
.comment-tag.l {
  background-color: #D62D73; /* レズビアンのピンク */
  color: #fff; /* テキストの色を白に */
}

.comment-tag.g {
  background-color: #1C8DFF; /* ゲイの青 */
  color: #fff; /* テキストの色を白に */
}

.comment-tag.b {
  background-color: #9B4F96; /* バイセクシュアルの紫 */
  color: #fff; /* テキストの色を白に */
}

.comment-tag.t {
  background-color: #55CDFC; /* トランスジェンダーのライトブルー */
  color: #fff; /* テキストの色を白に */
}

.comment-tag.q {
  background-color: #FFA500; /* クエスチョニング/クィアのオレンジ */
  color: #fff; /* テキストの色を白に */
}

.comment-tag.not-set {
  background-color: #808080; /* 未設定のグレー */
  color: #fff; /* テキストの色を白に */
}



.report-button {
  display: block; /* 通報ボタンを新しい行に配置 */
  color: #6c757d; /* 通常の文字色と合わせる */
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0; /* 余白をなくす */
  text-decoration: none; /* 下線なし */
}

.report-button:hover {
  text-decoration: underline; /* ホバー時に下線を表示 */
}





.comment-reply-link {
  color: #A1D6B2;
  text-decoration: none;
  margin-left: auto;
}

.comment-reply-link:hover {
  opacity: 0.7;
}

.comment-content {
  font-size: 1.25rem;
  font-weight: bold;
  color: #A1D6B2; /* コメントのテキストカラーを変更 */
  margin-bottom: 10px;
}


.comment-image {
  display: block; /* ブロック表示にすることで余白を制御 */
  max-width: 60%; /* 画像の最大幅を60%に設定 */
  margin: 10px auto; /* 画像を中央に配置 */
  height: auto; /* 高さを自動で調整して縦横比を維持 */
  border-radius: 4px; /* 角丸にする */
  border: 1px solid #ddd; /* 画像に枠線を追加 */
  object-fit: contain; /* 画像がコンテナ内に収まるように調整 */
}

.comment-image img {
  max-width: 60%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #ddd;
}


.reply-image {
  display: block; /* ブロック表示にすることで余白を制御 */
  max-width: 60%; /* 画像の最大幅を60%に設定 */
  margin: 10px auto; /* 画像を中央に配置 */
  height: auto; /* 高さを自動で調整して縦横比を維持 */
  border-radius: 4px; /* 角丸にする */
  border: 1px solid #ddd; /* 画像に枠線を追加 */
  object-fit: contain; /* 画像がコンテナ内に収まるように調整 */
}

.reply-image img {
  max-width: 60%;
  height: auto;
  border-radius: 4px;
  border: 1px solid #ddd;
}










.comment-meta {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #6c757d;
  margin-bottom: 10px;
}

.vote-section {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  margin-left: auto;
  justify-content: flex-end;
}

.vote-button {
  background-color: #A1D6B2;
  border: none;
  color: white;
  font-size: 1.2rem;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
}

.vote-button:disabled {
  background-color: #eeeeee;
}



.upvote-count, .downvote-count {
  font-size: 1rem;
  color: white; /* 投票数の色 */
  font-weight: bold;
}

.line {
  border: 1px solid #eee;
  margin: 10px 0;
}



/* 投票バー */
.vote-bar {
  display: flex;
  width: 15%;
  height: 14px;
  background-color: #eeeeee;
  border-radius: 2px;
  overflow: hidden;
  margin-top: 0;
  position: relative; /* 位置調整のために追加 */
}

.vote-bar-up {
  background-color: #A1D6B2; /* いいねの色 */
  height: 100%;
  transition: width 0.3s ease;
  z-index: 1; /* 表示優先度を上げる */
}

.vote-bar-down {
  background-color: #eeeeee; /* 悪いねの色 */
  height: 100%;
  transition: width 0.3s ease;
  position: absolute; /* 絶対位置で配置 */
  right: 0; /* 右端から始める */
  z-index: 0; /* 表示優先度を下げる */
}











/* 返信を見に行くボタン */
/* 返信リンクのスタイル */
.reply-link {
  color: #A1D6B2; /* 緑色のリンク */
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: bold;
  transition: color 0.3s ease;
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.reply-link:hover {
  opacity: 0.7;
}

.reply-link i {
  color: #A1D6B2; /* アイコンの色も緑色に合わせる */
}




/* コメント投稿 */
.comment-form button {
  background-color: #A1D6B2;
  border: none;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.comment-form button:hover {
  background-color: #8bc59b;
}






/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 0;
  list-style: none;
}

.pagination .step-links {
  display: flex;
  gap: 10px;
  font-size: 1rem;
  color: white;
}

.pagination a {
  padding: 8px 16px;
  background-color: #A1D6B2;
  color: #ffffff;
  text-decoration: none;
  border-radius: 5px;
}

.pagination a:hover {
  background-color: #8bc59b;
}

.pagination .current {
  padding: 8px 16px;
  background-color: white;
  color: #A1D6B2;
  border-radius: 5px;
  font-weight: bold;
  line-height: 1.5;
}

.pagination a:disabled {
  pointer-events: none;
  background-color: #eeeeee;
  color: #c72f2f;
}






/* 特定のフィールドにのみスタイルを適用 */
.styled-input {
  display: inline-block; /* インプットとチェックボックスをインライン表示にする */
  margin: 0;
}

/* ラベルと対応するインプットを横並びにする */
.styled-input + label {
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle; /* インプットとの位置を中央に揃える */
}

.styled-input[type="checkbox"] {
  width: auto; /* チェックボックスの幅を自動調整 */
}

.styled-input[type="text"] {
  width: 10%; /* テキストフィールドの幅を10%に設定 */
  margin-left: 5px;
}



/* 特定のフィールドのラベルとインプットを左寄せにする */
.left-align-group {
  text-align: left;
}

/* .left-align-group内のラベルを左寄せにする */
.left-align-group label {
  display: inline-block;
  margin-bottom: 0.5rem;
  text-align: left; /* 左寄せに設定 */
  font-weight: bold;
  color: #6c757d;
}

/* .left-align-group内のインプットやチェックボックス */
.left-align-group input,
.left-align-group .styled-input {
  display: inline-block;
  margin: 0;
  text-align: left;
}



.cols {
  width: 100%; /* 幅を全体の100%に設定 */
  height: 100px; /* 高さを200pxに設定 */
}









/* sidebar */
.create-thread-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%; /* ボタンをサイドバーの幅いっぱいに */
  padding: 10px 40px;
  background-color: #A1D6B2; /* ボタンの背景色 */
  color: #ffffff; /* テキストの色 */
  border: none;
  border-radius: 2px; /* 角を丸める */
  font-size: 1.1rem; /* テキストの大きさ */
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 20px; /* ボタンの下の余白 */
}

.create-thread-button i {
  margin-right: 10px; /* アイコンとテキストの間のスペース */
  font-size: 1.2rem; /* アイコンのサイズ */
}

.create-thread-button:hover {
  opacity: 0.7;
}


.create-thread-link {
  text-decoration: none !important;
}








/* 週間ランキングセクション */
/* .weekly-ranking-section {
  margin-top: 20px;
} */

.weekly-ranking-section h3 {
  font-size: 1.1rem;
  color: #A1D6B2;
  margin: 0;
}

.weekly-ranking-list {
  list-style: none;
  padding: 0; /* Add padding for alignment */
  margin: 0;
}

.weekly-ranking-item {
  padding-bottom: 8px;
  padding-top: 8px;
}

.weekly-ranking-link {
  text-decoration: none;
  color: #6c757d; /* Standard color for links */
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.weekly-ranking-link:hover {
  text-decoration: underline; /* Underline on hover */
}

.weekly-ranking-image {
  width: 4rem;
  height: 4rem;
  margin-right: 10px; /* Add spacing between image and text */
}

.weekly-ranking-image img {
  width: 4rem;
  height: 4rem;
  border-radius: 4px; /* Rounded corners for images */
}

.weekly-ranking-texts {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.weekly-ranking-title {
  margin: 0;
  font-size: 1rem; /* Color for the titles */
}

.ranking-comments {
  font-size: 0.8rem;
  color: #6c757d; /* Comment count color */
  justify-self: flex-start;
  align-self: flex-start;
}





/* タグ */
.popular-tags {
  margin-top: 2rem;
}

.popular-tags h3 {
  font-size: 1.1rem;
  color: #A1D6B2;
  margin: 0;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tag-item {
  display: inline-block;
  padding: 5px 10px;
  background-color: #A1D6B2; /* 緑のテーマカラー */
  color: #ffffff;
  border-radius: 3px;
  font-size: 0.75rem;
  transition: background-color 0.3s ease;
}

.tag-item a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
}

.tag-item:hover {
  background-color: #8bc59b; /* ホバー時の色を少し濃い緑色に変更 */
}






/* カテゴリー */
.category-list {
  margin-top: 2rem;
}

.category-list h3 {
  font-size: 1.1rem;
  color: #A1D6B2;
  margin-bottom: 10px;
}

.category-container {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin: 5px 0; /* 各アイテムに均等な間隔を設定 */
}

.category-item a {
  display: inline-block;
  padding: 3px 0; /* 内側の余白を設定 */
  text-decoration: none;
  color: #6c757d;
  font-size: 14px;
}

.category-item a:hover {
  opacity: 0.7;
}



@media (max-width: 768px)  {
  .main-content {
    margin: 0;
  }

  .side {
    display: none;
  }

  .container {
    min-width: 100vw;
    max-width: 100vw;
    margin: 0 auto;
    box-sizing: border-box;
  }
  .thread-detail {
    max-width: 800px;
    margin: auto;
    padding: 0;
  }

  .thread-image {
    width: 20vw;
    height: 20vw;
    border-radius: 4px;
    margin-left: 0;
    margin-right: 20px;
  }
  
  .thread-image img {
    width: 20vw;
    height: 20vw;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
  }

  .thread-header-content {
    /* flex: 1; */
    display: flex;
    flex-direction: column;
    /* margin-top: 10px; */
  }

  .thread-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #6c757d;
    font-size: 3.5vw;
  }

  .comment-post-button {
    display: none;
  }


  .date-full {
    display: none !important; /* !important を使って優先度を高める */
  }
  
  .date-relative {
    display: inline !important; /* !important を使って優先度を高める */
  }


  .comment-item {
    padding: 0;
    margin-bottom: 10px;
    position: relative;
  }

  .vote-bar {
    /* display: flex; */
    width: 25%;

  }


  .form-group {
    max-width: 90vw;
    margin: 0;
  }





  .thread-title {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 10px;
    font-weight: bold;
    margin-top: 0;
  }

}





