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

.container {
  flex: 0 0 50%; /* 幅を50%に設定 */
  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: 0;
  margin-right: 20px;
  margin-left: 0;
}

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

.thread-header-content {
  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;
}

.thread-meta .fa-comments {
  margin-right: 5px;
}

.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 {
  opacity: 0.7;
}

.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-size: 1rem;
}

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

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

.citation-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  object-position: center;
}

.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;
  word-wrap: break-word; /* 長い単語やURLを改行する */
  overflow-wrap: break-word;
}

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

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

/* 各コメント */

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

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

.comment-header span {
  white-space: nowrap;
}

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

.comment-date {
  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: #6c757d; /* デフォルトのコメント色を黒に設定 */
  margin: 0;
  margin-top: 5px;
  margin-bottom: 10px;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  transition: color 0.3s ease, font-size 0.3s ease; /* トランジション効果を追加 */
}

/* プラスが20以上のコメント */
.comment-item.positive-comment .comment-content {
    color: #A1D6B2; /* パステルグリーン */
}

/* マイナスが20以上のコメント */
.comment-item.negative-comment .comment-content {
    font-size: 1.15rem; /* 文字サイズを少し小さく */
    color: #6c757d; /* 文字色は黒のまま */
}

.comment-image {
  margin-top: 10px;
  margin-bottom: 10px;
  text-align: center;
}

.comment-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; /* アイコンの色も緑色に合わせる */
}

/* ページネーション */
.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;
}

.seperate-comment {
  border: none;
  border-top: 2px dashed #A1D6B2;
  margin: 20px 0;
}

/* コメント投稿 */
.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 {
  opacity: 0.7;
}

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

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

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

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

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

.form-group input {
  width: 100%; /* 幅を全体の100%に設定 */
  max-width: 100%; /* 最大幅を100%に制限 */
  box-sizing: border-box; /* パディングやボーダーも幅に含める */
  border: none;
  padding: 0;
}

.cols {
  width: 100%; /* 幅を全体の100%に設定 */
  max-width: 100%; /* 最大幅を100%に制限 */
  height: 100px; /* 高さを200pxに設定 */
  box-sizing: border-box; /* パディングやボーダーも幅に含める */
}

.username {
  min-width: 20vw;
  width: 100%;
  border: 1px solid #ccc; /* ボーダーを追加 */
  border-radius: 4px; /* 角を丸める */
  box-sizing: border-box; /* パディングやボーダーを含めてサイズを計算 */
  font-size: 1rem; /* フォントサイズを設定 */
}

/* 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 */
  object-fit: cover;
  object-position: center;
}

.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;
}

/* 例: モーダルのスタイルを調整 */
#parent-comment-modal {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

#parent-comment-modal {
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

.parent-comment-reference {
  display: inline-block;
  cursor: pointer;
  color: #A1D6B2;
  padding: 2px 5px;
  background-color: #e0ffe9;
  font-size: 1rem;
  border-radius: 2px;
}

.parent-comment-reference:hover {
  text-decoration: underline;
}

@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 {
    display: flex;
    flex-direction: column;
  }

  .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 {
    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;
  }

  .thread-content {
    font-size: 1.1rem;
  }

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

/* セクシャリティセレクトボックスとラベル */
.styled-select {
  display: block;
  width: 100%;
  margin-top: 5px;
}

.styled-select select {
  width: 100%;
  padding: 8px;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  transition: border-color 0.3s ease;
}

.styled-select select:focus {
  border-color: #A1D6B2;
  outline: none;
}

/* フォームの全体スタイル */
.form-group {
  margin-bottom: 1.5rem;
}

/* フォームのラベル */
.form-group label {
  display: block;
  font-weight: bold;
  color: #6c757d;
  margin-bottom: 0.5rem;
  text-align: left;
}

/* 名前フィールドのスタイル */
.username-field {
  display: block; /* フィールドが隠れないようにする */
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  color: #000;
}

/* チェックボックスとラベルのグループ */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-input {
  width: auto;
}

.form-group input.username-field {
  border: 1px solid #ddd;
  padding: 8px;
}
.form-group textarea {
  width: 100%;
  max-width: 100%;
  height: 100px; /* 必要に応じて高さを調整 */
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  color: #000;
  resize: vertical; /* ユーザーが垂直方向にサイズ変更を可能にする */
}

/* エラーメッセージ */
.error {
  color: red;
  margin-top: 5px;
  font-size: 0.875rem;
}

/* 固定コメントボタンのコンテナ */
.fixed-comment-button {
  position: fixed;
  bottom: 5rem;
  right: 5rem;
  z-index: 1000; /* 他の要素より前面に表示 */
}
/* コメントアイコンボタン */
.comment-icon-button {
    background-color: #A1D6B2; /* テーマカラーに合わせる */
    border: none;
    color: white;
    width: 60px; /* 固定幅を設定 */
    height: 60px; /* 固定高さを設定 */
    border-radius: 50%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 1.5rem; /* アイコンのサイズ調整 */
    display: flex; /* アイコンを中央に配置 */
    align-items: center;
    justify-content: center;
}

.comment-icon-button:hover {
    background-color: #8bc59b; /* ホバー時に色を変更 */
    transform: scale(1.1); /* ホバー時に少し拡大 */
}

.comment-icon-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(161, 214, 178, 0.5);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .fixed-comment-button {
        bottom: 15px;
        right: 15px;
    }

    .comment-icon-button {
        width: 50px; /* モバイル用の幅を調整 */
        height: 50px; /* モバイル用の高さを調整 */
        font-size: 1.2rem; /* アイコンのサイズ調整 */
    }
} 
