.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 {
  /* max-width: 800px; */
  margin: auto;
  /* padding: 20px; */
}

.thread-header {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
}

.thread-image {
  width: 100px;
  height: 100px;
  border-radius: 4px;
  margin-right: 20px;
}

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

.thread-header-content {
  flex: 1;
}

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

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

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


.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;
text-align: left;
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-box p {
  text-align: left;
}


.citation-image {
  width: 8vw;
  height: 8vw;
  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;
}

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






h1 {
  font-size: 1.5rem;
  color: #A1D6B2; /* 緑色に設定 */
  margin-bottom: 1rem;
  text-align: center;
}

.paragraph {
  width: 70vw;
  margin: o;
  margin: auto;
}



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








.form-container label {
  display: block;
  font-weight: bold;
  color: #6c757d;
  margin-bottom: 0.5rem;
  text-align: left;
}

/* 全てのテキスト入力、ファイル入力、セレクトボックス、テキストエリアに共通のスタイル */
form input[type="text"],
form input[type="file"],
form textarea,
form select {
    display: block; /* 要素をブロック要素にして中央寄せ可能に */
    width: 100%; /* 幅を設定 */
    padding: 0.5rem;
    margin: 0 auto 1rem auto; /* 上下左右中央寄せ */
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-sizing: border-box; /* パディングとボーダーを含めて幅を計算 */
}

/* textareaに対するスタイル */
.styled-input 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; /* ユーザーが垂直方向にサイズ変更を可能にする */
}

/* usernameフィールドに対するスタイル */
.form-group .username-field {
    width: 100%; /* 幅を100%に設定 */
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #000;
}

/* styled-inputクラスに対するスタイル */
.styled-input {
    display: block; /* インプットとチェックボックスをインライン表示にする */
    margin: 0;
}

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

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

.form-button {
    display: block; /* ボタンをブロック要素にして中央寄せ可能に */
    margin: 0 auto; /* 左右中央寄せ */
    margin-top: 1rem;
    background-color: #A1D6B2; /* ボタンの背景色 */
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    color: white;
    width: 50%; /* ボタンの幅 */
    text-align: center;
    border: none;
    border-radius: 4px;
}

.form-button:hover {
    opacity: 0.7;
}

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

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

.left-align-group input,
.left-align-group .styled-input {
    display: inline-block;
    margin: 0;
    text-align: left;
}





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

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

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

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

/* 特定の入力フィールドにのみスタイルを適用 */
.form-group .username-field {
    width: 100%; /* 幅を100%に設定 */
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    color: #000;
}

/* 他のstyled-inputのスタイルを調整 */
.styled-input[type="text"] {
    width: 100%; /* 幅を100%に設定 */
    margin-left: 5px;
}


.styled-input[type="textarea"] {
  width: 100%; /* テキストフィールドの幅を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;
}


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



/* 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: #A1D6B2; /* ホバー時の色を少し濃い緑色に変更 */
}






/* カテゴリー */
.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;
}




.form-group {
  width: 100%;
}




@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: 2vw;
    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;
  }



}








.error {
    color: red;
    margin-top: 5px;
    font-size: 0.875rem;
}
