body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    background-color: white;
    color: black;
  
}
#main-container.visible {
  opacity: 1;
}
header {
  height:100px;
  background-color: white; /* 背景を黒色 */
  color: black; /* 文字色を白色 */
  padding: 15px; /* 内側の余白 */
  align-items: center; /* 縦方向に中央揃え */
  text-align: center; /* テキストを中央寄せ */
  border: 1px solid gray; /* 灰色の枠線 */
}
header h1{
  line-height: 100px; /* 高さを`header`と一致させる */
  white-space: nowrap; /* 折り返しを防止 */
  margin: 0; /* 余白をリセット */
}
main {
  max-width: 800px;
  margin: 10px auto;
  padding: 0 20px; /* 上下に 0、左右に 20px の余白を設定 */
  background:white;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  color: black;
}
div{
  background-color: white;
}
input{
  color: gray;
  background-color: white;
}
.comment_area{
  /* height: 50%; */
}
.post-form textarea {
    height: 100px;
    width: 100%;
    /* padding: 10px; */
    margin-bottom: 10px;
    /* border-radius: 5px; */
    font-size: 30px; /* フォントサイズを大きく設定 */
    color: black;
    border: none;
    outline: none; /* フォーカス時の枠線も消す場合 */
    resize: none;
    background-color: white;
}

.post-form button {
    /* padding: 10px 15px; */
    border: none;
    cursor: pointer;
} 


.post {
  position: relative; /* 子要素の絶対配置の基準を設定 */
    margin-bottom: 15px;
    padding: 10px 10px; /* 縦方向に8px、横方向に12pxの余白 */
    background: white;
    border: 1px solid gray;
    border-radius: 5px;
}

.password_field{
  /* width: 60%; */
  font-size: 15px; /* フォントサイズを大きく設定 */
  margin-left: auto; /* 右端に押しやる */
    color: black;
    border: none;
    outline: none; /* フォーカス時の枠線も消す場合 */
}

.anonymous_password_field{
  /* width: 40%; */
}

.container {
  display: flex;               /* 子要素を横並びにする */
  align-items: center;         /* 子要素を縦方向で中央揃え */
  gap: 10px;                   /* 子要素間の間隔を調整 */
}
.action-container {
  display: flex; /* Password と Post を横並びにする */
  align-items: center;
  margin-left: auto; /* 右端に配置 */
}
.admin-link {
    margin-left: 20px;
    font-size: 14px;
    text-decoration: none;
    color: #007BFF;
}

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

.login-form {
    max-width: 300px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.login-form input {
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-form button {
    padding: 8px;
    font-size: 16px;
    background-color: #007BFF;
    color: black;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.login-form button:hover {
    background-color: #0056b3;
}

.error {
    color: red;
    font-size: 14px;
    text-align: center;
}

.like-button {
    display: flex;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 16px;
}

.like-button .liked {
    color: rgb(51, 44, 184);
    font-size: 10px;
    /* 少し大きくして視認性を向上 */
    transition: transform 0.2s, color 0.2s;
}
.like-button .not-disliked {
  color: gray; /* Dislike されていない時の色 */
}
.like-button .not-liked {
    color: gray;
    font-size: 18px;
    transition: transform 0.2s, color 0.2s;
}

.like-button:hover .liked,
.like-button:hover .not-liked {
    transform: scale(1.2);
    /* マウスオーバーで少し拡大 */
}

.heart {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: gray;
    mask: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') no-repeat center / contain;
    -webkit-mask: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>') no-repeat center / contain;
    transition: background-color 0.3s ease;
}
.likes-count {
  color: black; /* 白文字 */
  margin: 0; /* 不要な余白を削除 */
}
.heart.liked {
    background-color: red;
}

.heart.not-liked {
    background-color: gray;
}

.post-image {
    max-width: 100%;
    max-height: 500px; /* 高さの上限を指定 */
  object-fit: contain; /* 画像の縦横比を維持しつつ収める */
    margin-top: 10px;
}

.share-buttons {
  display: flex;
  gap: 10px; /* ボタン間の余白 */
}

.share-button {
  display: flex;
  align-items: center;
  gap: 5px; /* アイコンとテキストの間の余白 */
  background-color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  font-size: 14px;
  color: black;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.share-button i {
  font-size: 16px; /* アイコンのサイズ */
}

.share-button:hover {
  /* background-color: #e0e0e0; ホバー時の背景色 */
}

/* ファイルアップロードエリアの基本スタイル */
.file-upload {
    display: inline-block;
    position: relative;
  }
  
  .file-upload input[type="file"] {
    display: none;
  }
  
  .file-upload-label {
    /* display: inline-block; */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    cursor: pointer;
    border-radius: 8px;
    background-color: white;
  }
/*   
  .file-upload-label:hover {
    background-color: #e0e0e0;
  } */
  
  /* スタイル1: モダンなドキュメントアイコン */
  .file-icon.style1 {
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234A90E2' d='M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 7V3.5L18.5 9H13z'/%3E%3Cpath fill='%234A90E2' d='M12 14l-4 4h3v4h2v-4h3l-4-4z'/%3E%3C/svg%3E") no-repeat center center;
    background-size: contain;
  }
  
  /* スタイル2: クラウドアップロードアイコン */
  .file-icon.style2 {
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234A90E2' d='M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z'/%3E%3C/svg%3E") no-repeat center center;
    background-size: contain;
  }
  
  /* スタイル3: フォルダアップロードアイコン */
  .file-icon.style3 {
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234A90E2' d='M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10zm-8-4l-2.5 3.01L7 14l3.01-4 3.99 5H10z'/%3E%3Cpath fill='%234A90E2' d='M11 9V5h2v4h3l-4 4-4-4z'/%3E%3C/svg%3E") no-repeat center center;
    background-size: contain;
  }
  
  /* ドラッグ&ドロップエリア */
  .file-upload-area {
    border: 2px dashed #4A90E2;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
  }
  
  .file-upload-area.drag-over {
    background-color: rgba(74, 144, 226, 0.1);
    border-color: #2171c7;
  }
  
  /* レスポンシブ対応 */
  @media (max-width: 768px) {
    .file-upload-label {
      width: 20px;
      height: 20px;
    }
    
    .file-icon {
      width: 14px;
      height: 14px;
    }

    .password_field{
      /* width: 60%; */
      font-size: 8px; /* フォントサイズを大きく設定 */

    }
    
  }

  /* 送信ボタンのスタイル */
  .submit-btn {
    display: inline-block;        /* 要素をインラインブロックにする */
    /* margin-left: auto; 右端に押しやる */
    background-color: white;    /* ボタンの背景色 */
    color: black;                 /* テキストの色 */
    font-size: 15px;              /* フォントサイズ */
    padding: 10px 30px;           /* 上下・左右の余白 */
    border: none;                 /* 枠線をなくす */
    border-radius: 50px;          /* 左右を完全な半円にする */
    cursor: pointer;              /* ホバー時にポインタを表示 */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* 柔らかい影 */
    transition: all 0.3s ease;    /* アニメーション効果を追加 */
}

  /* 送信アイコン */
  .submit-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M2.01 21L23 12 2.01 3 2 10l15 2-15 2z'/%3E%3C/svg%3E") no-repeat center center;
    background-size: contain;
  }
  
  /* レスポンシブ対応 */
  @media (max-width: 768px) {
    .file-upload-label,
    .submit-btn {
      padding: 12px;
    }
    
    .file-icon,
    .submit-icon {
      width: 20px;
      height: 20px;
    }
  }

 /* フィルタエリア */
.filter {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* フィルタエリア */
.filter {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* セレクトボックス */
.minimal-select {
  background: none;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 8px 12px;
  color: black;
  font-size: 16px;
  appearance: none; /* デフォルトの矢印を隠す */
  outline: none;
  transition: border-color 0.2s ease;
}

.minimal-select:hover,
.minimal-select:focus {
  border-color: #888; /* ホバー時に少し明るいグレー */
}

/* ボタン */
.minimal-button {
  background: white; /* ダークグレー */
  border: 1px solid #333;
  color: black;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.minimal-button:hover {
  background-color: #bebdbd; /* 少し明るいグレー */
  /* transform: scale(1.05); ホバー時に少し拡大 */
}

.minimal-button:active {
  background-color: #999999; /* クリック時に黒へ */
  transform: scale(0.95); /* 押した時に少し縮小 */
}

/* アドミン画面 のパスワード*/
.password-update {
    margin-top: 20px;
}

.password-update input {
    padding: 10px;
    font-size: 16px;
    margin-right: 10px;
}

.password-update button {
    padding: 10px;
    font-size: 16px;
    background-color: #4CAF50;
    color: black;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.password-update button:hover {
    background-color: #45a049;
}
/* カテゴリ */
.categories {
  padding: 0; /* 必要に応じて調整 */
  margin: 0; /* 必要に応じて調整 */
}
.categories label {
  display: block;
  margin-bottom: 8px;
  font-size: 16px;
  cursor: pointer;
  /* color: black; */
}

.category_display{
color: lightblue;
}
.categories input[type="radio"] {
  margin-right: 8px;
}
.categories-container {
  /* position: absolute; /* 親要素内での絶対配置 */
  /* top: 5px; 上端からの距離 */
  /* right: 8px; 右端からの距離 */ 
  /* border-radius: 4px; 角を丸くする */
  font-size: 15px; /* フォントサイズ調整 */
  /* color: white; テキスト色 */
  /* border-radius: 5px; */

  padding: 3px 12px; /* ← 左右に余白（右寄せしつつ余裕を持たせる） */
  text-align: right;
  background-color: transparent;
 color: white;
 border-radius: 5px;
}
/* 
.category-text{
 
 background-color: blue;
}  */

.post-content {
  white-space: pre-line; /* 改行を反映 */
}

/* リンク */
a {
  text-decoration: none;
  color: #007bff;
  background-image: linear-gradient(currentColor, currentColor); /* 背景線として描画 */
  background-size: 0% 1px; /* 線を細く */
  background-position: 0 100%; /* 文字の真下に配置 */
  background-repeat: no-repeat; /* 繰り返さない */
}

a:active {
  background-size: 100% 1px; /* 押した時も表示 */
}

/* リプライフォーム */
.reply-form {
  background-color: white;
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translateX(-50%); /* 水平中央に配置 */
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 80%;
  /* height: 80%; */
  max-width: 600px;
  z-index: 10; /* 他の要素より上に表示 */
  display: none; /* 初期状態では非表示 */
}

.reply-form textarea {
  width: 100%;
  height: 100px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  background-color: white;
  color:black;
}
/* 
.reply-form button {
  color: white;
  border: none;
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 4px;
} */

.reply-form button:hover {
  /* background-color: #0056b3; */
}

.reply-button{
  background: none;
  border: none;
  color: black;
}

.submit_reply{
  display: inline-block;        /* 要素をインラインブロックにする */
    /* margin-left: auto; 右端に押しやる */
    background-color: white;    /* ボタンの背景色 */
    color: black;                 /* テキストの色 */
    font-size: 20px;              /* フォントサイズ */
    padding: 10px 30px;           /* 上下・左右の余白 */
    border: none;                 /* 枠線をなくす */
    border-radius: 50px;          /* 左右を完全な半円にする */
    cursor: pointer;              /* ホバー時にポインタを表示 */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* 柔らかい影 */
    transition: all 0.3s ease;    /* アニメーション効果を追加 */
}
/* モディファイ */
.modify-button{
  background: none;
  border: none;
  color: black;
}

/* 背景のオーバーレイ */
.overlay {
  display: none; /* 初期状態は非表示 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); /* 背景を半透明の黒に */
  z-index: 10; /* フォームの下で、他の要素の上 */
}

/* ページネーション */
#pagination-container {
  display: flex;
  justify-content: space-between; /* 左右に配置 */
  align-items: center;
  width: 100%;
  max-width: 600px;
  margin: 20px auto; /* 中央揃え */
  padding: 10px;
}
/* 基本のボタンスタイル */
.pagination-button {
  padding: 8px 16px;
  margin: 0;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  cursor: pointer;
  border-radius: 4px;
}

/* ボタンのスペース調整 */
.first-button,
.prev-button {
  margin-right: 5px; /* FIRSTとPREVの間隔を狭く */
}

.prev-button,
.next-button {
  margin-right: 10px; /* PREVとNEXTの間隔を広く */
}

.next-button,
.last-button {
  margin-right: 5px; /* NEXTとLASTの間隔を狭く */
}

/* ボタンが無効の場合のスタイル */
.pagination-button:disabled {
  background-color: #e0e0e0;
  cursor: not-allowed;
  color: #888;
}

/* モーダルの基本スタイル */
.modal {
  display: none; /* 初期状態では非表示 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8); /* 背景を半透明の黒に */
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* モーダル内の画像スタイル */
.modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 閉じるボタンのスタイル */
.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: rgb(178, 176, 176);
  font-size: 24px;
  cursor: pointer;
  z-index: 1001;
}

/* シェア */
.share {
  position: relative;
}

.share-menu {
  display: none; /* 初期状態では非表示 */
  position: absolute;
  top: 40px; /* ボタンの下に表示 */
  left: 0;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.share-menu button {
  display: block;
  padding: 10px 20px;
  border: none;
  background: none;
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.share-menu button:hover {
  background-color: #f5f5f5;
}

/* 投稿ボタンのスタイル */
.post-button {
  position: fixed; /* 画面に固定表示 */
  bottom: 20px;    /* 画面下からの距離 */
  right: 20px;     /* 画面右からの距離 */
  width: 60px;     /* ボタンの幅 */
  height: 60px;    /* ボタンの高さ */
  background-color: #7e89ff; /* ボタンの背景色（お好みで変更可能） */
  color: black;    /* アイコンの色 */
  border: none;    /* ボーダーを削除 */
  border-radius: 50%; /* 丸いボタン */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* ボタンの影 */
  font-size: 24px; /* アイコンサイズ */
  display: flex;   /* アイコンの中央配置 */
  justify-content: center; /* 水平中央配置 */
  align-items: center; /* 垂直中央配置 */
  cursor: pointer; /* カーソルをポインターに変更 */
  transition: transform 0.3s, background-color 0.3s; /* アニメーション効果 */
  z-index: 20;
}

/* ホバー時のスタイル */
.post-button:hover {
  /* background-color: #ff5fa0; ホバー時の色 */
  transform: scale(1.1);    /* 少し大きくなる */
}
.ad-post {
  height: 180px;
  text-align: center;
  margin: 10px 0; /* 広告の間隔を調整 */
  padding: 10px;
  border-radius: 8px; /* 枠の角を丸く */
}

.ad-label {
  font-size: 14px;
  font-weight: bold;
  color: #ff6f61;
  margin-bottom: 5px;
}

.ad-image {
  max-width: 100px; /* 画像の横幅を調整 */
  height: auto; /* 縦横比を維持 */
  border-radius: 4px; /* 画像の角を丸く */
}

.image-preview {
  margin-top: 10px;
  max-width: 100%;
  display: flex;
  justify-content: center;
}

.image-preview img {
  max-width: 150px;
  max-height: 150px;
  border: 1px solid #ccc;
  border-radius: 8px;
  object-fit: cover;
}
@media (max-width: 600px) {
  
  .image-preview {
      max-height: 150px; /* スマホ向けに高さ調整 */
  }

  .image-preview img {
      max-width: 80px;
      max-height: 80px;
  }
  /* カテゴリ */
.categories label {
  font-size: 8px;
}
}
.reply-container{
  display: none; /* 初期状態は非表示 */
  /* position: fixed; */
  z-index:9;
  
  /* width: 90%; */
  /* max-width: 600px; 幅を調整 */
  max-width: 800px;
  padding: 0 20px;
  margin:  10px auto ;
}
.index-hider{
  overflow-y: auto;  /* 縦スクロールを許可 */
  display: none; /* 初期状態は非表示 */
  position: fixed;
  top:0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: (255, 255, 255); /* 背景を半透明の黒に */
  z-index: 8; /* フォームの下で、他の要素の上 */
}
.no-scroll {
  
  overflow: hidden ;
}
.back-container {
  margin-bottom: 100px; /* 20px 分の余白を下に追加 */
}
.settings-container {
  display: flex;
  flex-direction: column;
  gap: 20px; /* 子要素間のスペースを10pxに */
}
.code-input textarea{
    width: 100%;  /* 横幅を親要素いっぱいに広げる */
    max-width: 500px; /* 最大幅を制限（必要に応じて変更） */
    height: 70px; /* 高さを大きめに */
    padding: 10px; /* 内側の余白を増やす */
    font-size: 16px; /* 文字サイズを大きく */
    border-radius: 5px; /* 角を丸く */
    border: 1px solid #ccc; /* 枠線を薄く */

}
.setting-item {
  display: flex;
  flex-direction: column; /* 縦に並べる */
  align-items: flex-start; /* 左揃え */
  gap: 2px; /* 各要素の間隔を調整 */
}


@media (max-width: 600px) {
  .filter {
      gap: 4px; /* スマホでは余白を少し縮小 */
  }

  .minimal-select, .minimal-button {
      padding: 5px 8px; /* さらに小さめに */
      font-size: 10px; /* テキストを小さく */
      min-width: auto; /* 幅の制約を解除 */
  }
}