body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background: linear-gradient(to bottom, #e3f2fd, #90caf9);
    color: #333;
}

header {
    text-align: center;
    background: #1e88e5;
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

#taxonomy p::first-letter,
#aboutBaikins p::first-letter {
  margin-left: 1em; /* 全角スペースと同等の幅 */
}

button {
    background-color: #42a5f5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

table th,
table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
    vertical-align: top;
}

table td img {
    max-width: 100px; /* 画像の幅を制限 */
    height: auto; /* アスペクト比を維持 */
    display: block;
    margin: 0 auto; /* 中央揃え */
}

table td div p {
    margin: 0;
    padding: 0;
}

table td ul {
    list-style-type: none; /* リストスタイルを非表示 */
    margin: 0;
    padding: 0;
}


.character {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
}

.character img {
    max-width: 100%;
    margin-bottom: 10px;
    border-radius: 8px;
}

/* Vertical View Layout */
.character-container {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.character-image img {
    max-width: 150px;
    height: auto;
    border-radius: 8px;
}

.character-image h2 {
    text-align: center;
    font-size: 1.2em;
    color: #1e88e5;
    margin-top: 10px;
}

.character-details h2 {
    font-size: 1.5em;
    color: #1e88e5;
    margin-top: 0;
}

.filter-container {
    margin-bottom: 20px;
    text-align: right;
}

.filter-container input {
    width: 300px;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.filter-container input:focus {
    border-color: #1e88e5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Panel View Layout */
#panelview {
    display: grid;
    grid-template-columns: repeat(auto-fill, 100px); /* 横幅100pxで詰めて並べる */
    gap: 10px; /* パネル間の間隔 */
    justify-content: center; /* パネル全体を中央揃え */
    padding: 20px;
    width: 100%; /* レイアウトを画面幅に適応 */
    box-sizing: border-box; /* パディング込みで幅を計算 */
}

.panel-character {
    width: 120px; /* パネルの横幅を固定 */
    height: 160px; /* パネルの高さを固定 */
    display: flex;
    float: left;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* デフォルトで下揃え */
    position: relative; /* 内部要素の絶対位置設定を有効にする */
    padding: 10px;
    margin:1px;
    background-size: cover;
    background-repeat: no-repeat; /* 背景画像の繰り返しを防ぐ */
    background-position: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.panel-header {
    position: absolute;
    top: 5px; /* パネル上部からの距離 */
    left: 50%;
    transform: translateX(-50%); /* 中央揃え */
    font-size: 0.8rem;
    font-weight: bold;
    color: #fff; /* 見やすい色を設定 */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8); /* 視認性向上 */
    text-align: center;
    background: rgba(0, 0, 0, 0.5); /* 半透明の背景 */
    padding: 2px 5px;
    border-radius: 4px;
}

.panel-character:hover {
    transform: scale(1.05); /* ホバー時の拡大 */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* ホバー時の影 */
}

.panel-image img {
    max-width: 80px; /* 画像の最大幅 */
    height: 80px; /* 高さを固定 */
    margin-bottom: 5px; /* 画像と名前の間隔 */
    border-radius: 8px; /* 角を丸める */
}

.panel-name {
    font-size: 0.8rem; /* フォントサイズを調整 */
    font-weight: bold; /* 太字 */
    color: #333; /* テキストカラー */
    text-align: center; /* 中央寄せ */
}


/*背景を属性により変更*/
.panel-character[data-feature="Royal Family"] {
    background: linear-gradient(to bottom, #fff3b0, #ffc107); /* 黄色を基調とした華やかさ */
    border: 2px solid #ff9800;
}

.panel-character[data-feature="Common"] {
    background: linear-gradient(to bottom, #fff3b0, #ffc107); /* 黄色を基調とした華やかさ */
    border: 2px solid #ff9800;
}

.panel-character[data-feature="Water"] {
    background: linear-gradient(to bottom, #e0f7fa, #81d4fa); /* 青基調 */
    border: 2px solid #0288d1;
}

.panel-character[data-feature="Hot"] {
    background: linear-gradient(to bottom, #ffb0b0, #ff0707); /* 黄色を基調とした華やかさ */
    border: 2px solid #ff0000;
}

.panel-character[data-feature="Default"] {
    background: linear-gradient(to bottom, #b0ffb7, #07ff1c); /* 黄色を基調とした華やかさ */
    border: 2px solid #00ff37;
}


.stars {
    font-size: 1rem; /* 星のサイズ */
    color: #ffc107; /* 黄色い星の色 */
}

.gray-star {
    color: #ffc10733; /* 灰色の星の色 */
}

select#view-select {
    background-color: #42a5f5;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
  }
  
  select#view-select:focus {
    outline: none;
    border: 2px solid #1e88e5;
  }
  #back-button {
    background-color: #3936f4;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-left: 10px;
  }
  
  #back-button:hover {
    background-color: #230da3;
  }
  .info-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, #2196f3, #42a5f5);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    clear: both;
    text-align: center;
  }
  
  .info-text {
    font-size: 14px;
  }
  
  .info-text p {
    margin: 0;
  }
  
  .version-number {
    font-weight: bold;
    color: #ffeb3b;
  }
  
/* 戻るボタンのスタイル */
.styled-button {
    background-color: #4272f5; /* 背景色を爽やかなブルーに */
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
  }
  
  .styled-button:hover {
    background-color: #1e88e5; /* ホバー時に少し濃い青に */
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); /* ホバー時の影 */
  }
  
  .back-button-container {
    text-align: right;
  }  
  
  /* Footer Styles */
.footer-container {
    background: linear-gradient(to right, #0d47a1, #1976d2);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin-top: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  .footer-container p {
    margin: 5px 0;
    font-size: 14px;
  }
  
  .footer-container ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 15px;
  }
  
  .footer-container ul li {
    display: inline;
  }
  
  .footer-container ul li a {
    color: #ffeb3b;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
  }
  
  .footer-container ul li a:hover {
    color: #fff;
  }
  
  .footer-container ul li::before {
    content: "|";
    margin: 0 10px;
    color: #ffeb3b;
  }
  
  .footer-container ul li:first-child::before {
    content: none;
  }

  /* How to Use Section */
    .normal {
    background: #fefff3; /* Light green background */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 20px auto;
    max-width: 800px;
    font-size: 16px;
    color: #333;
    line-height: 1.6;
  }
  
.normal h2 {
    font-size: 1.8rem;
    color: #558b2f; /* Dark green for header */
    margin-bottom: 10px;
  }
  
  .normal ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 10px;
  }
  
  .normal ul li {
    margin-bottom: 10px;
  }
  
  #relatedpage ul {
    list-style: none; /* デフォルトの箇条書きを削除 */
    padding: 0;
  }
  
  #relatedpage ul li {
    background: linear-gradient(to right, #42a5f5, #478ed1);
    color: white;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }
  
  #relatedpage ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    display: block; /* リンク全体がクリック可能になるように */
  }
  
  #relatedpage ul li:hover {
    transform: scale(1.03); /* ホバー時に少し拡大 */
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
  }
  
  #relatedpage ul li a:hover {
    text-decoration: underline; /* ホバー時に下線を追加 */
  }
  #charastory {
    position: relative;
    background: #f9f9f9; /* Light background color */
    border: 2px solid #ddd; /* Border for the bubble */
    border-radius: 10px; /* Rounded corners */
    padding: 10px 15px; /* Space inside the bubble */
    margin: 10px 0; /* Space outside the bubble */
    font-size: 14px; /* Adjust text size */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a slight shadow */
}

#charastory::before {
    content: "";
    position: absolute;
    bottom: -10px; /* Position below the bubble */
    left: 20px; /* Adjust arrow position horizontally */
    width: 0;
    height: 0;
    border: 10px solid transparent; /* Create the triangle */
    border-top-color: #ddd; /* Match the border color */
}

#charastory::after {
    content: "";
    position: absolute;
    bottom: -8px; /* Slightly higher than ::before to cover the gap */
    left: 22px; /* Slightly offset to align */
    width: 0;
    height: 0;
    border: 8px solid transparent; /* Smaller triangle */
    border-top-color: #f9f9f9; /* Match the background color */
}
.bacteria-style {
  position: relative;
  text-align: center;
  margin: 20px 0;
  overflow: hidden; /* 拡大時に画像がはみ出ないように設定 */
}

.bacteria-style h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
  font-family: 'Arial', sans-serif;
  font-size: 2em;
  font-weight: bold;
  z-index: 2;
  margin: 0;
  padding: 0;
}

.bacteria-style img {
  width: 50%; /* 通常は小さいサイズで表示 */
  transition: transform 0.3s ease, width 0.3s ease; /* アニメーションで拡大をスムーズに */
}

.bacteria-style:hover img {
  transform: scale(2); /* ホバー時に200%に拡大 */
}

