body {
  font-family: "Noto Sans JP", sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  background-color: #202124;
  padding-top: 50px;
  outline: 2px solid red !important;
}

.container {
  width: 90%;
  padding: 20px;
  border-radius: 15px;
  color: white;
  border: 2px solid #7d7d7d;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  display: block;
}

/*検索システム*/
.highlight {
  font-weight: bold;
  color: #333333;
  background-color: Yellow;
  padding: 3px 5px;
}

input[type="text"]:focus {
  border-color: #007bff;
  box-shadow: 0 0 8px rgba(0, 123, 255, 0.2);
  outline: none;
}

/* メインコンテンツセクション */
main {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  /* 縦に並べる */
  align-items: center;
  padding: 20px;
}

/* ブログ記事のカード */

.blog-card {
  display: flex;
  flex-direction: row;
  /* 横並びに変更 */
  align-items: center;
  border-bottom: 3px solid #d1d1d1;
  margin: 15px 0;
  /* 縦に追加されるように上下マージン */
  width: 100%;
  /* カード全体の幅を確保 */
  max-width: 800px;
  /* 最大幅を指定 */
  overflow: hidden;
}

.blog-card img {
  width: 100px;
  /* 固定幅 */
  height: auto;
  object-fit: cover;
}

.blog-card .content {
  padding: 15px;
  flex: 1;
  /* タイトル部分を拡張 */
}

/* リンクのスタイルを調整 */
.blog-card a {
  display: block;
  /* ブロック要素として設定 */
  width: 100%;
  /* 横幅をカード全体に固定 */
  text-decoration: none;
  /* 下線を削除 */
  color: inherit;
  /* 親の文字色を継承 */
}

.blog-card h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  color: #ffffff;
}

.blog-card p {
  text-align: left;
  font-size: 1rem;
  line-height: 1.6;
  color: #ffffff;
  margin: 0;
}

.blog-card .Group {
  font-size: 1rem;
  line-height: 1.6;
  color: #ffffff;
  margin: 0;
}

/*Dev*/
/*Dev*/
.blog-card h2 {
  position: relative;
  /* 必須: ::afterの位置調整に必要 */
  margin: 0 0 10px;
  font-size: 1.5rem;
  color: #ffffff;
  display: inline-block;
  /* テキスト内容の幅に限定 */
}

.blog-card h2::after {
  position: absolute;
  left: 0;
  content: "";
  width: 100%;
  /* h2のテキスト幅に合わせる */
  height: 2px;
  background: #ffffff;
  /* アンダーラインの色 */
  bottom: -5px;
  /* アンダーラインの位置調整 */
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  /* アニメーションの滑らかさ */
}

.blog-card h2:hover::after {
  visibility: visible;
  bottom: 0;
  /* ホバー時のアンダーライン位置 */
  opacity: 1;
}

/*Dev::h2にホバーアニメーションを追加*/

.container {
  width: 100%;
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  border-radius: 15px;
  color: white;
  border: 2px solid #7d7d7d;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  /* 横方向のレイアウトを保つ */
  display: block;
}

.title {
  color: white;
  text-align: center;
}

/*記事ここまで*/

/*トップページへ戻る*/
html {
  scroll-behavior: smooth;
}

.pagetop {
  height: 50px;
  width: 50px;
  position: fixed;
  right: 30px;
  bottom: 30px;
  background: #fff;
  border: solid 2px #000;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.pagetop__arrow {
  height: 10px;
  width: 10px;
  border-top: 3px solid #000;
  border-right: 3px solid #000;
  transform: translateY(20%) rotate(-45deg);
}

/*トップページへ戻る*/
/*参考:https://rilaks.jp/blog/pagetop-css/*/

.search-container {
  /* position: absolute と関連プロパティを削除します */
  margin-left: auto;
  /* Flexアイテムとして左マージンを自動に */
  margin-right: auto;
  /* Flexアイテムとして右マージンを自動に */
  width: 60%;
  /* 幅は維持 */
  max-width: 500px;
  /* 広がりすぎないように最大幅を設定 */
  /* z-index: 1001; は通常Flexアイテムには不要です */
}

.search-form {
  display: flex;
  align-items: center;
  border: 2px solid #424242;
  border-radius: 25px;
  overflow: hidden;
  background-color: #424242;
  width: 100%;
  max-width: 500px;
  /* 推奨：これで横幅制限 */
}

.search-box {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 15px;
  font-size: 16px;
  background-color: transparent;
  color: white;
  min-width: 0;
  /* ← はみ出し防止 */
}

.search-button {
  border: none;
  background-color: #424242;
  padding: 10px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* ← ボタンの幅を縮めないように */
}

.search-button i {
  font-size: 18px;
  color: #888;
}

.search-button:hover i {
  color: #000;
}

/*検索フォームのデザイン*/

#loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px;
  font-size: 16px;
  color: #444;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 5px solid #ccc;
  border-top-color: #1f2128;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#how_to_use_popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border: 1px solid #ccc;
  padding: 20px;
  z-index: 1002;
  width: 80%;
  border-radius: 5px;
  /* 角丸 */
}

#close_popup {
  background-color: #424242;
  /* 背景色 */
  color: white;
  /* 文字色 */
  border: none;
  /* 枠線を削除 */
  padding: 10px 20px;
  /* 内側の余白 */
  border-radius: 5px;
  /* 角丸 */
  cursor: pointer;
  /* カーソルを指マークに */
}

#close_popup:hover {
  background-color: #666;
  /* ホバー時の背景色 */
}

.popup-animation {
  opacity: 0;
  transform: translate(-50%, -60%) scale(0.98);
  transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
    transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
}

.popup-animation.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.tab-bar {
  text-align: center;
  position: relative;
}

.tab-underline {
  position: absolute;
  bottom: 0;
  height: 3px;
  background-color: #3a8df9;
  transition: left 0.3s ease, width 0.3s ease;
  border-radius: 2px;
}

.tab-content {
  font-size: 1rem;
  color: #222;
  background: #f8f8f8;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: none;
}

.tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.tab-button {
  background: none;
  border: none;
  color: rgb(0, 0, 0);
  padding: 15px 20px;
  font-size: 16px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
}

.tab-button.active {
  color: #000000;
}

.tab-button.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 50%;
  height: 1px;
  background-color: #3a8df9;
  /* 青いアンダーライン */
  border-radius: 2px;
  transition: all 0.3s ease;
}

.tab-button:hover {
  color: #000000;
}

.tab-content {
  font-size: 1rem;
  color: #222;
  background: #f8f8f8;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/*トップページへ戻る*/
html {
  scroll-behavior: smooth;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 30px;
  /* paddingを含めると実際の高さは50px */
  display: flex;
  align-items: center;
  background-color: rgba(32, 33, 36, 0.8);
  /* 半透明 */
  backdrop-filter: blur(6px);
  /* 背景ぼかし */
  padding: 10px;
  z-index: 1000;
  /* ヘッダーを前面に固定 */
}

/* ハンバーガーボタン（ヘッダーの外） */
.menu-toggle {
  position: fixed;
  top: 8px;
  right: 20px;
  width: 40px;
  height: 40px;
  z-index: 4000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  background: transparent;
}

.bar {
  width: 30px;
  height: 4px;
  background: #dbdbdb;
  border-radius: 2px;
  transition: 0.3s ease;
}

.menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .bar:nth-child(2) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* サイドバー */
.sidebar {
  position: fixed;
  top: 0;
  right: -300px;
  width: 250px;
  height: 100vh;
  /* Changed to viewport height */
  background: rgba(32, 33, 36, 0.95);
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.4s ease;
  z-index: 2000;
  padding: 80px 20px 20px;
  box-sizing: border-box;
  /* Added for better padding and height management */
}

.sidebar.active {
  right: 0;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar ul li {
  padding: 15px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  /* 暗い背景に対してこの区切り線は目立たない可能性があります */
  font-size: 18px;
  /* color: #333; この色は暗い背景では読みにくいため、下の a タグのスタイルで上書きされていることを確認してください */
}

.sidebar ul li a {
  /* padding: 15px 0; liのpaddingと重複する可能性があります */
  /* border-bottom: 1px solid rgba(0,0,0,0.1); liに既にborder-bottomがあるため、不要かもしれません */
  display: block;
  /* li全体をクリッカブルにする場合など */
  padding: 15px 0;
  /* liのpaddingを0にしてこちらで制御する方が良い場合もあります */
  font-size: 18px;
  color: #ffffff;
  text-decoration: none;
}

footer {
  font-family: "Noto Sans JP", sans-serif;
  width: 100%;
  left: 0px;
  color: white;
  background-color: #1e1e1e;
  text-align: center;
  padding: 10px 0;
}

/*----レスポンスデザイン----*/
@media (max-width: 768px) {
  .container {
    width: 80%;
  }

  .sub_container {
    width: 90%;
  }
}
