/* nurugai-ability.css */
/* 基本カラー設定 - ヌルガイの土と森のイメージカラー（明るいバージョン） */
:root {
  --main-color: #c19a6b; /* 明るい黄土色 */
  --accent-color: #5d9c2d; /* 明るい緑 */
  --dark-color: #4a3c2a; /* ダークブラウン */
  --light-color: #f8f4e3; /* 明るいベージュ */
  --background-color: #f0e6d2; /* 薄いベージュの背景 */
  --text-color: #4a3c2a; /* テキストはダークブラウン */
  --section-bg: rgba(255, 255, 255, 0.85); /* 明るいセクション背景 */
  --section-shadow: rgba(74, 60, 42, 0.15); /* ソフトな影 */
}

/* 基本設定 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-color);
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f0e6d2"/><path d="M0,0L100,100M100,0L0,100" stroke="%23e4d7bd" stroke-width="1"/></svg>');
  background-attachment: fixed;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダー */
header {
  padding: 40px 0 20px;
  text-align: center;
  position: relative;
}

header:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 3px;
  background: linear-gradient(to right, transparent, var(--main-color), transparent);
}

h1 {
  color: var(--main-color);
  font-size: 28px;
  margin-bottom: 30px;
  text-shadow: 0 0 10px rgba(193, 154, 107, 0.5);
  position: relative;
  display: inline-block;
}

h1:before, h1:after {
  content: "🌿";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

h1:before {
  left: -40px;
}

h1:after {
  right: -40px;
}

/* 目次 */
.toc {
  background-color: var(--section-bg);
  border-left: 5px solid var(--main-color);
  margin: 30px 0;
  padding: 15px;
  border-radius: 0 5px 5px 0;
  box-shadow: 0 5px 15px var(--section-shadow);
}

.toc ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.toc li {
  margin: 8px 0;
  width: 100%;
}

.toc a {
  color: var(--main-color);
  text-decoration: none;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 3px;
  transition: all 0.3s ease;
  display: inline-block;
}

.toc a:hover {
  background-color: var(--accent-color);
  color: var(--light-color);
  transform: translateX(5px);
}

/* セクション共通 */
section {
  margin: 50px 0;
  padding: 25px;
  background-color: var(--section-bg);
  border-radius: 10px;
  box-shadow: 0 10px 20px var(--section-shadow);
  position: relative;
  overflow: hidden;
}

section:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--main-color), var(--accent-color));
}

h2 {
  color: var(--main-color);
  font-size: 24px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
}

h3 {
  color: var(--accent-color);
  font-size: 20px;
  margin-bottom: 20px;
}

h4 {
  color: var(--main-color);
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: bold;
}

p {
  margin-bottom: 20px;
}

/* 画像 */
figure {
  margin: 20px 0 30px;
  text-align: center;
}

figure img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 5px 15px var(--section-shadow);
}

figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--main-color);
}

/* メンター/教師一覧 */
.mentors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.mentor-item {
  background-color: rgba(255, 255, 255, 0.5);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px var(--section-shadow);
  transition: all 0.3s ease;
  border-left: 3px solid var(--accent-color);
}

.mentor-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--section-shadow);
  background-color: rgba(255, 255, 255, 0.8);
}

.mentor-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.mentor-item h4 {
  color: var(--accent-color);
  margin-bottom: 15px;
  position: relative;
  font-size: 18px;
}

.mentor-item h4 a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.mentor-item h4 a:hover {
  color: var(--main-color);
  text-decoration: underline;
}

.mentor-item h4:after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 50%;
  height: 2px;
  background-color: var(--main-color);
}

.mentor-item img {
  border-radius: 50%;
  border: 3px solid var(--main-color);
  padding: 3px;
  background-color: rgba(255, 255, 255, 0.7);
  max-width: 80px;
  height: auto;
}

.mentor-item p {
  margin-bottom: 0;
  flex: 1;
}

/* ナビゲーションボタン */
.navigation-buttons {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 10px;
  width: 100%;
}

.nav-button {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 25px;
  background: linear-gradient(135deg, var(--main-color), var(--accent-color));
  color: #ffffff; /* 純白に変更 */
  text-decoration: none;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 4px 10px var(--section-shadow);
  transition: all 0.3s ease;
  flex: 1;
  text-align: center;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); /* テキストの影を濃くして可読性をさらに向上 */
}

.nav-button:visited {
  color: #000000; /* 訪問済みリンクを黒色に変更 */
  text-shadow: none; /* 影を削除してシンプルに */
}

.nav-button:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.6s ease;
}

.nav-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 7px 15px var(--section-shadow);
  color: white;
}

.nav-button:hover:before {
  left: 100%;
}

.back-to-toc:before {
  content: "↑ ";
}

.related-link:before {
  content: "→ ";
}

/* パンくずリスト */
.breadcrumb-nav {
  margin: 20px 0 30px;
  background-color: var(--section-bg);
  border-radius: 8px;
  padding: 12px 15px;
  box-shadow: 0 3px 10px var(--section-shadow);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  margin-right: 5px;
  font-size: 14px;
}

.breadcrumb-item:not(:last-child)::after {
  content: "›";
  color: var(--accent-color);
  margin-left: 5px;
  font-size: 18px;
  line-height: 1;
}

.breadcrumb-link {
  color: var(--main-color);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 4px 8px;
  border-radius: 4px;
}

.breadcrumb-link:hover {
  background-color: rgba(93, 156, 45, 0.2);
  color: var(--dark-color);
}

.current-page {
  color: var(--accent-color);
  font-weight: bold;
  padding: 4px 8px;
}

/* 記事情報・更新日時・SNSボタン */
.article-info {
  margin: 30px 0;
  position: relative;
}

.info-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  background-color: var(--section-bg);
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 5px 15px var(--section-shadow);
  position: relative;
  overflow: hidden;
}

.info-container:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--main-color), var(--accent-color));
}

/* 更新情報 */
.update-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-icon {
  width: 20px;
  height: 20px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23c19a6b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>') no-repeat center center;
  flex-shrink: 0;
}

.time {
  margin: 0;
  font-size: 14px;
  color: var(--dark-color);
}

.time time {
  color: var(--main-color);
  font-weight: bold;
}

/* シェアボタン */
.share-buttons {
  display: flex;
  align-items: center;
}

.share-group {
  display: flex;
  gap: 15px;
  align-items: center;
  position: relative;
}

.share-group:before {
  content: "シェア:";
  color: var(--accent-color);
  font-size: 14px;
  margin-right: 10px;
}

/* Twitterボタンカスタマイズ */
.twitter-share-button {
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.twitter-share-button:hover {
  transform: translateY(-3px);
}

/* Facebookボタンカスタマイズ */
.fb-share-button {
  position: relative;
  display: inline-block;
  transition: all 0.3s ease;
}

.fb-share-button:hover {
  transform: translateY(-3px);
}

.fb-share-button a {
  color: var(--dark-color);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--accent-color);
  background-color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
  display: inline-block;
}

.fb-share-button a:hover {
  background-color: var(--accent-color);
  color: var(--light-color);
}

/* 過去編・能力編タブ切り替え */
.character-edition-tabs {
  display: flex;
  justify-content: center;
  margin: 30px auto 40px;
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.edition-tab {
  flex: 1;
  text-align: center;
  padding: 15px 20px;
  color: var(--light-color);
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  border-radius: 8px 8px 0 0;
  position: relative;
  transition: all 0.3s ease;
  background: linear-gradient(to bottom, rgba(193, 154, 107, 0.9), rgba(193, 154, 107, 0.7));
  border-bottom: 3px solid transparent;
}

.edition-tab:hover:not(.disabled) {
  transform: translateY(-3px);
  background: linear-gradient(to bottom, rgba(193, 154, 107, 1), rgba(193, 154, 107, 0.8));
}

.edition-tab.current {
  background: linear-gradient(to bottom, rgba(93, 156, 45, 0.9), rgba(93, 156, 45, 0.7));
  color: white;
  border-bottom: 3px solid var(--main-color);
  pointer-events: none;
}

.edition-tab.disabled {
  background: rgba(180, 180, 180, 0.5);
  color: rgba(255, 255, 255, 0.6);
  cursor: not-allowed;
  pointer-events: none;
}

.edition-tab:not(.current):not(.disabled):after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: transparent;
  transition: all 0.3s ease;
}

.edition-tab:not(.current):not(.disabled):hover:after {
  background-color: var(--main-color);
}

/* おすすめセクション */
#recommendations {
  margin: 50px 0;
  position: relative;
  padding-top: 30px;
}

#recommendations:before {
  content: "おすすめ記事";
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, var(--main-color), var(--accent-color));
  color: var(--light-color);
  padding: 8px 20px;
  font-weight: bold;
  font-size: 18px;
  border-radius: 0 0 8px 0;
  box-shadow: 3px 3px 10px var(--section-shadow);
}

#recommendations:after {
  content: "";
  position: absolute;
  top: 60px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, var(--main-color), var(--accent-color), transparent);
}

#recommendations a {
  display: block;
  background-color: var(--section-bg);
  margin: 20px 0;
  padding: 20px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--dark-color);
  box-shadow: 0 5px 15px var(--section-shadow);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  border-left: 5px solid var(--accent-color);
}

#recommendations a:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 15px 30px var(--section-shadow);
  background-color: rgba(255, 255, 255, 0.95);
  border-left-color: var(--main-color);
}

#recommendations a:before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transition: all 0.6s ease;
}

#recommendations a:hover:before {
  left: 100%;
}

#recommendations img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 15px;
  box-shadow: 0 3px 10px var(--section-shadow);
  transition: all 0.4s ease;
}

#recommendations a:hover img {
  transform: scale(1.03);
  box-shadow: 0 5px 15px var(--section-shadow);
}

/* 著作権表記 & フッター強化 */
.copy {
  background-color: rgba(255, 250, 240, 0.9);
  border-top: 4px solid;
  border-image: linear-gradient(to right, var(--main-color), var(--accent-color)) 1;
  padding: 30px 25px;
  margin-top: 60px;
  box-shadow: 0 -5px 20px var(--section-shadow);
  position: relative;
}

.copy:before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  background-color: var(--background-color);
  border: 3px solid var(--main-color);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(193, 154, 107, 0.5);
}

.copy p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.copy strong {
  color: var(--main-color);
  font-weight: bold;
}

.contact-info {
  background-color: rgba(248, 244, 227, 0.7);
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: inset 0 0 10px var(--section-shadow);
  border-left: 3px solid var(--accent-color);
}

.contact-info a {
  color: var(--main-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-info a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.usage-terms {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0;
  padding-top: 15px;
  border-top: 1px dashed rgba(93, 156, 45, 0.3);
}

.usage-terms p {
  margin-bottom: 10px;
}

.usage-terms a {
  color: var(--main-color);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.usage-terms a:hover {
  background-color: var(--accent-color);
  color: var(--light-color);
}

.copyright {
  text-align: center;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px solid rgba(93, 156, 45, 0.3);
  font-size: 13px;
  color: var(--dark-color);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.copyright img {
  vertical-align: middle;
  margin-right: 5px;
}

.copyright a {
  color: var(--main-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.copyright a:hover {
  background-color: rgba(93, 156, 45, 0.2);
  color: var(--dark-color);
}

/* リンクのスタイル */
a {
  color: var(--accent-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--main-color);
  text-decoration: underline;
}

a:visited {
  color: #7d8850; /* 訪問済みリンクは少し暗めの緑に */
}

/* 特別なリンクのスタイル */
.push0 {
  position: relative;
  overflow: hidden;
  color: var(--accent-color);
}

.push0:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(to right, var(--main-color), var(--accent-color));
  transform: translateX(-100%);
  transition: all 0.3s ease;
}

.push0:hover {
  color: var(--main-color);
  text-decoration: none;
}

.push0:hover:after {
  transform: translateX(0);
}

/* 自然をモチーフにしたh1タイトルデザイン */
h1 {
  position: relative;
  font-family: "Noto Sans JP", "ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro", sans-serif;
  font-size: 32px;
  font-weight: 900;
  text-align: center;
  color: var(--main-color);
  text-shadow: 0 2px 5px var(--section-shadow);
  margin: 40px 0 50px;
  padding: 15px 20px;
  letter-spacing: 1px;
  transform-origin: center;
  animation: natureIn 1.2s ease-out forwards;
  display: inline-block;
  width: auto;
  max-width: 100%;
}

/* 自然の成長のようなアニメーション */
@keyframes natureIn {
  0% {
    clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0 100%);
    transform: translateY(30px);
    opacity: 0;
  }
  60% {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    transform: translateY(0);
    opacity: 1;
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  h1 {
    font-size: 24px;
    margin: 30px 0 40px;
  }

  h1:before, h1:after {
    display: none;
  }

  section {
    padding: 20px 15px;
  }

  .toc ul {
    flex-direction: column;
  }

  .mentors-grid {
    grid-template-columns: 1fr;
  }

  .navigation-buttons {
    flex-direction: column;
  }

  .nav-button {
    width: 100%;
  }

  .info-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .share-group {
    width: 100%;
    justify-content: flex-start;
  }

  .character-edition-tabs {
    max-width: 100%;
    margin: 20px auto 30px;
  }

  .edition-tab {
    font-size: 16px;
    padding: 12px 15px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  h1 {
    font-size: 20px;
    margin: 20px 0 30px;
    padding: 10px 15px;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 16px;
  }

  section {
    padding: 15px 10px;
  }

  .edition-tab {
    font-size: 14px;
    padding: 10px;
  }

  .copy {
    padding: 20px 10px;
  }

  .copyright {
    flex-direction: column;
  }
}

/* メディアクエリを追加して大画面での表示を最適化 */
@media (min-width: 769px) {
  #recommendations {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  #recommendations:before {
    grid-column: 1 / -1;
    width: fit-content;
  }

  #recommendations:after {
    grid-column: 1 / -1;
  }
}
/* 死罪人一覧 */
#death-row-prisoners {
  margin: 50px 0;
  padding: 25px;
  background-color: var(--section-bg);
  border-radius: 10px;
  box-shadow: 0 10px 20px var(--section-shadow);
  position: relative;
  overflow: hidden;
}

#death-row-prisoners:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(to right, var(--main-color), var(--accent-color));
}

.prisoners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.prisoner-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid var(--accent-color);
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.prisoner-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--section-shadow);
  background-color: rgba(255, 255, 255, 0.8);
  border-color: var(--main-color);
}

.prisoner-item img {
  border: 3px solid var(--main-color);
  border-radius: 50%;
  transition: all 0.3s ease;
  margin-bottom: 10px;
  padding: 3px;
  background-color: rgba(255, 255, 255, 0.7);
  width: 64px;
  height: 64px;
}

.prisoner-item:hover img {
  transform: scale(1.1);
  border-color: var(--accent-color);
}

.prisoner-name {
  color: var(--dark-color);
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  margin-top: 5px;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .prisoners-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .prisoners-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }

  .prisoner-item {
    padding: 10px;
  }

  .prisoner-name {
    font-size: 12px;
  }
}
