:root {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --accent-color: #03a9f4;
}

/* 全体の背景色とフォント */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
}

body, #wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

hr {
  border: 1px solid #006bf7; /* 線の色を変更 */
  margin: 20px 0; /* 上下の余白を調整 */
}

/* ヘッダー全体のスタイル */
.header {
  background-color: 1e293b;
  padding: 10px 20px;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

/* ヘッダーのコンテンツを横並びに */
.header-content {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  width: 100%;
  flex-wrap: wrap; /* 必要に応じて折り返し */
}

/* タイトルのスタイル */
.site-title {
  font-size: 30px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 10px; /* タイトルとタブの間に余白を追加 */
}

/* タイトルリンクのスタイル */
.site-title a {
  color: #ffffff; /* 白色で見やすく */
  text-decoration: none; /* 下線を削除 */
}

.site-title a:visited {
  color: #319cf3; /* 訪問済みリンクを明るい青色に */
}

.site-title a:hover {
  color: #38bdf8; /* ホバー時にさらに明るい青色 */
}

/* ナビゲーションタブのスタイル */
.nav {
  border-top: 2px solid #e2e8f0; /* タイトルとの間に線を追加 */
  padding: 10px 0;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.nav li {
  margin: 0;
}

.nav a {
  display: block;
  padding: 8px 12px;
  text-decoration: none;
  color: #e2e8f0;
  background-color: #1e293b; /* タブの背景色 */
  border: 1px solid #334155; /* タブの枠線 */
  border-radius: 4px; /* タブを少し丸く */
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav a:hover {
  background-color: #334155; /* ホバー時に少し明るく */
  color: #ffffff; /* ホバー時の文字色を白に */
}

.nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 16px;
}

.nav a:hover {
  color: #60a5fa;
}

/* ヒーローセクション */
.hero {
  background: linear-gradient(135deg, #1e293b, #334155);
  text-align: center;
  padding: 5px 10px;
  color: #e2e8f0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.hero h2 {
  font-size: 40px;
  font-weight: bold;
  margin-bottom: 10px;
}

.hero p {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* セクション */
.latest-articles, .categories, .recommended-articles {
  padding: 40px 20px;
  text-align: center;
}

.article-list, .category-list {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 10px;
}

.article-list a {
  text-decoration: none;
}

/* カードデザイン */
.card {
  width: 450px; /* カードの幅を固定 */
  height: 480px; /* カードの高さを固定 */
  padding: 20px;
  border-radius: 10px;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden; /* はみ出した内容を隠す */
  text-align: center; /* テキストを中央揃え */
}

/* カード内の画像 */
.card img {
  width: 100%;
  height: 220px; /* 画像の高さはここで変える */
  object-fit: cover; /* 画像をカード内に収める */
  border-radius: 8px;
}

/* 最新記事カード */
.latest-articles .card {
  width: 450px; /* 通常より大きめ */
  height: 450px;
}

/* おすすめ記事カード */
.recommended-articles .card {
  width: 450px; /* 通常より大きめ */
  height: 450px;
}

/* たぶん使用されてない */
/* 記事カテゴリカード */
.categories .card {
  width: 400px; /* 横長に設定 */
  height: 120px; /* 高さを調整 */
  padding: 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.categories .card h4 {
  font-size: 18px; /* タイトルのフォントサイズを大きく */
  margin-bottom: 5px;
}

.categories .card p {
  font-size: 14px; /* 説明文のフォントサイズを大きく */
}

.categories .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.8);
}

.card.blue {
  background: linear-gradient(135deg, #1e40af, #1e293b);
}

.card.green {
  background: linear-gradient(135deg, #10b981, #065f46);
}

.card.gold {
  background: linear-gradient(135deg,  #9333ea, #6b21a8);
}

/* カード内のタイトル */
.card h4 {
  font-size: 21px;
  color: #fffbd4;
  margin-bottom: 0px;
  white-space: nowrap; /* テキストを1行に制限 */
  overflow: hidden; /* はみ出した部分を隠す */
  text-overflow: ellipsis; /* はみ出した部分を「...」で表示 */
}

/* カード内の説明文 */
.card p {
  font-size: 18px;
  color: #c4c4e6;
  text-align: center;
  line-height: 1.2;
  max-height: 3.6em; /* 最大3行分の高さに制限 */
  overflow: hidden; /* はみ出した部分を隠す */  
  text-overflow: ellipsis; /* はみ出した部分を「...」で表示 */
}

/* 記事カテゴリのスタイル */
.category-list {
  display: flex;
  gap: 10px;
}

.category-list .card {
  width: 130px; /* 横幅を調整 */
  height: 40px; /* 高さを調整 */
  padding: 5px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #065f46;
  color: #ffffff;
  border-radius: 4px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-list .card h4 {
  font-size: 12px; /* フォントサイズを調整 */
  margin: 0;
}

.category-list .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.card .category {
  font-size: 14px;
  color: #ffffff;
  background-color: #065f46; /* 緑色の背景 */
  padding: 5px 10px;
  border-radius: 4px;
  margin-top: 10px;
  margin-bottom: -20px;
  text-align: left;
}

/* タグのスタイル */
.card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: auto; /* カードの下部に配置 */
}
.card .tags span {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card .tag {
  font-size: 12px;  
  color: #ffffff;
  background-color: #1e40af; /* 青色の背景 */
  padding: 3px 6px;
  border-radius: 4px;
  text-align: center;
}

/* カテゴリ一覧ページのスタイル */
.taxonomy-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.taxonomy-list li {
  margin-bottom: 20px;
  padding: 10px;
  border: 1px solid #334155;
  border-radius: 4px;
  background-color: #1e293b;
}

.taxonomy-list li a {
  color: #60a5fa;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
}

.taxonomy-list li p {
  margin: 5px 0 0;
  color: #e2e8f0;
  font-size: 14px;
}

/* ボタン */
.btn {
  display: inline-block;
  padding: 10px 20px;
  color: var(--accent-color);
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  text-decoration: none;
  border-radius: 5px;
  font-size: 14px;
  transition: transform 0.2s, background 0.3s;
}

.btn:hover {
  transform: translateY(-4px);
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
}

/* フッター */
footer {
  margin-top: auto;
  background: #1e293b;
  color: #94a3b8;
  text-align: center;
  padding: 2px 0;
}

/* 記事ページ */
article {
  max-width: 1200px; /* 横幅を広げる */
  margin: 0 auto;
  padding: 20px;
  background: #1e293b;
  color: #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
  article {
    max-width: 100%; /* モバイルでは横幅を画面いっぱいに */
    padding: 10px; /* パディングを調整 */
  }
}

article h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--accent-color);
}

article h2 {
  font-size: 1.5rem;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--accent-color);
}

article p {
  line-height: 1.6;
  margin-bottom: 15px;
}

article a {
  color: #60a5fa;
  text-decoration: none;
}

article a:hover {
  text-decoration: underline;
}

/* レイアウト全体の設定 */
.layout {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

/* メインコンテンツのスタイル */
.main-content {
  flex: 3; /* メインコンテンツを広く取る */
  padding: 20px;
  background: #1e293b;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

/* サイドバーの基本スタイル */
.sidebar {
  width: 250px;
  padding: 16px;
  background-color: #1f1f1f;
  color: #e0e0e0;
}

.sidebar a{
  background-color: #1e293b;
  color: #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

/* 人気記事ウィジェットのスタイル */
.popular-posts h3 {
  font-size: 1.2em;
  margin-bottom: 12px;
  color: var(--accent-color);
}

.popular-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.popular-posts li {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.popular-posts li a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.popular-posts li img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 12px;
}

.popular-posts li span {
  font-size: 0.9em;
  line-height: 1.2;
  color: #e0e0e0;
}

/* リンクのホバー効果 */
.popular-posts li a:hover span {
  color: var(--accent-color);
}

/* カード内の続きを読むリンク */
.card .read-more {
  margin-top: auto; /* 下部に配置 */
  align-self: flex-end; /* 右下に配置 */
  font-size: 14px;
  color: #60a5fa;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.2s ease;
}

.card .read-more:hover {
  color: #38bdf8; /* ホバー時の色変更 */
}

.game-article {
  display: flex;
  flex-direction: column;
  align-items: left;
  padding: 20px;
  background-color: #2a2a2c;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.game-article p {
  font-size: 18px; /* フォントサイズを大きく */
  line-height: 1.7; /* 行間を調整 */
  margin-bottom:5px;
}

.game-article hr{
  border: 1px solid #e2e8f0; /* 線の色を変更 */
  margin: 20px 0; /* 上下の余白を調整 */
}

.game-info p {
  line-height: 0.8; /* 行間を詰める */
  margin-bottom: 5px; /* 下の余白を調整 */
}

.game-content p {
  font-size: 20px;
  color: #e2e8f0;
  line-height: 1.5; /* 行間を詰める */
  margin-bottom: 5px; /* 下の余白を調整 */  
}

.content-info p {
  font-size: 20px;
  color: #e2e8f0;
  line-height: 1.5; /* 行間を詰める */
  margin-bottom: 5px; /* 下の余白を調整 */  
}