/* タコピーの原罪 - ハッピー星人の掟 専用CSS */

/* フォントインポート */
@import url('https://fonts.googleapis.com/css2?family=Zen+Kaku+Gothic+New:wght@700;900&family=Noto+Sans+JP:wght@400;700&family=Bebas+Neue&display=swap');

/* CSS変数定義 */
:root {
  --takopi-pink: #ff69b4;
  --takopi-light-pink: #ffb6e0;
  --takopi-yellow: #ffd700;
  --takopi-dark-pink: #ff1493;
  --text-dark: #333;
  --text-gray: #666;
  --bg-white: #fff;
  --bg-light: #fffafc;
  --max-width: 1200px;
}

/* リセットCSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ベース設定 */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.8;
  background-image:
    /* タコのパターン - SVGをインラインで埋め込み */
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="%23ffb6e0" opacity="0.15" d="M24.74,22.39l-1.53-1.27c1.51-1.72,2.43-3.98,2.43-6.45,0-5.4-4.39-9.8-9.8-9.8S6.05,9.27,6.05,14.67c0,2.69,1.09,5.12,2.85,6.9l-1.45,1.2c-.81.67-.92,1.86-.25,2.66.37.45.92.69,1.46.69.42,0,.85-.14,1.2-.43l2.33-1.92c.05.02.11.04.16.06l-.51,1.08c-.45.94-.04,2.07.9,2.52.26.12.54.18.81.18.71,0,1.39-.4,1.71-1.08l.98-2.06c.07,0,.15,0,.22-.01l1.01,2.13c.32.68,1,1.08,1.71,1.08.27,0,.55-.06.81-.18.94-.45,1.35-1.58.9-2.52l-.65-1.38,2.09,1.73c.35.29.78.43,1.2.43.55,0,1.09-.23,1.46-.69.67-.81.55-2-.25-2.66Z"/></svg>'),
    /* 星のパターン */
    radial-gradient(circle at 10% 20%, var(--takopi-yellow) 0%, transparent 2%),
    radial-gradient(circle at 80% 80%, var(--takopi-yellow) 0%, transparent 2%),
    radial-gradient(circle at 40% 40%, var(--takopi-yellow) 0%, transparent 1.5%),
    radial-gradient(circle at 90% 10%, var(--takopi-yellow) 0%, transparent 1.5%),
    radial-gradient(circle at 30% 70%, var(--takopi-yellow) 0%, transparent 2%);
  background-position:
    0 0,
    10% 20%, 80% 80%, 40% 40%, 90% 10%, 30% 70%;
  background-size:
    100px 100px,
    100px 100px, 100px 100px, 100px 100px, 100px 100px, 100px 100px;
  background-repeat: repeat;
}

/* ヘッダー */
header {
  background-color: var(--takopi-pink);
  padding: 10px 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  font-size: 14px;
  color: var(--bg-white);
}

.breadcrumb a {
  color: var(--bg-white);
  text-decoration: none;
  transition: opacity 0.3s;
}

.breadcrumb a:hover {
  opacity: 0.8;
}

/* メインコンテンツ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 40px 40px;
  background-color: var(--bg-white);
  box-shadow: 0 0 20px rgba(255,105,180,0.1);
  border-radius: 20px;
  margin-top: 20px;
  margin-bottom: 40px;
  overflow: visible;
}

/* タイトル */
h1 {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  color: var(--takopi-dark-pink);
  text-align: center;
  margin: 20px 0 60px;
  text-shadow: 4px 4px 0 var(--takopi-yellow), 8px 8px 0 var(--takopi-light-pink);
  line-height: 1.3;
  letter-spacing: 0.05em;
  animation: title-pop 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: visible;
}

/* タイトルアニメーション */
@keyframes title-pop {
  0% {
    transform: scale(0.5) translateY(-20px);
    opacity: 0;
  }
  50% {
    transform: scale(1.05) translateY(5px);
  }
  70% {
    transform: scale(0.98) translateY(-2px);
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* タイトルの装飾アニメーション */
h1::before,
h1::after {
  content: "☆";
  position: absolute;
  font-size: 3rem;
  color: var(--takopi-yellow);
  text-shadow: 0 0 10px rgba(255,215,0,0.5);
  animation: star-sparkle 2s ease-in-out infinite;
}

h1::before {
  top: -20px;
  left: 50px;
  animation-delay: 0s;
}

h1::after {
  bottom: -20px;
  right: 50px;
  animation-delay: 1s;
}

@keyframes star-sparkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(180deg);
  }
}

/* 見出し */
h2 {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  color: var(--takopi-dark-pink);
  margin: 60px 0 20px;
  padding: 15px 25px;
  background: linear-gradient(135deg, var(--takopi-yellow) 0%, var(--takopi-light-pink) 50%, transparent 100%);
  border-radius: 10px;
  border-left: 8px solid var(--takopi-dark-pink);
  position: relative;
  text-shadow: 2px 2px 0 var(--bg-white);
  letter-spacing: 0.05em;
}

h2::before {
  content: "★";
  color: var(--takopi-yellow);
  font-size: 1.5rem;
  position: absolute;
  left: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(-15deg);
  animation: star-twinkle 2s infinite;
}

h2::after {
  content: "★";
  color: var(--takopi-yellow);
  font-size: 1.2rem;
  position: absolute;
  right: 20px;
  top: 10px;
  transform: rotate(15deg);
  animation: star-twinkle 2s infinite;
  animation-delay: 1s;
}

@keyframes star-twinkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1) rotate(15deg);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.9) rotate(15deg);
  }
}

h3 {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-gray);
  margin-bottom: 30px;
  padding-left: 20px;
  position: relative;
}

h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-color: var(--takopi-yellow);
  border-radius: 50%;
}

/* 目次 */
.table-of-contents {
  background-color: var(--bg-light);
  border: 3px solid var(--takopi-light-pink);
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  animation: gentle-fade-in 0.8s ease-out 0.5s forwards;
  opacity: 0;
}

@keyframes gentle-fade-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-of-contents::before {
  content: "";
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background-color: var(--takopi-yellow);
  border-radius: 50%;
  opacity: 0.3;
}

.table-of-contents h2 {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 1.5rem;
  margin: 0 0 20px;
  padding: 0;
  background: none;
  border: none;
  text-align: center;
  text-shadow: none;
}

.table-of-contents ul {
  list-style: none;
  padding: 0;
}

.table-of-contents li {
  margin-bottom: 10px;
  padding-left: 30px;
  position: relative;
}

.table-of-contents li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path fill="%23ff1493" d="M24.74,22.39l-1.53-1.27c1.51-1.72,2.43-3.98,2.43-6.45,0-5.4-4.39-9.8-9.8-9.8S6.05,9.27,6.05,14.67c0,2.69,1.09,5.12,2.85,6.9l-1.45,1.2c-.81.67-.92,1.86-.25,2.66.37.45.92.69,1.46.69.42,0,.85-.14,1.2-.43l2.33-1.92c.05.02.11.04.16.06l-.51,1.08c-.45.94-.04,2.07.9,2.52.26.12.54.18.81.18.71,0,1.39-.4,1.71-1.08l.98-2.06c.07,0,.15,0,.22-.01l1.01,2.13c.32.68,1,1.08,1.71,1.08.27,0,.55-.06.81-.18.94-.45,1.35-1.58.9-2.52l-.65-1.38,2.09,1.73c.35.29.78.43,1.2.43.55,0,1.09-.23,1.46-.69.67-.81.55-2-.25-2.66Z"/></svg>');
  background-repeat: no-repeat;
  background-size: contain;
}

.table-of-contents a {
  color: var(--takopi-pink);
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s;
}

.table-of-contents a:hover {
  color: var(--takopi-dark-pink);
  padding-left: 5px;
}

/* 画像 */
.main-image {
  margin: 30px 0;
  text-align: center;
  animation: gentle-fade-in 0.8s ease-out 0.8s forwards;
  opacity: 0;
}

.main-image img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.main-image figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--text-gray);
}

/* ビデオコンテナ */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 30px 0;
  border-radius: 10px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* エリンギセクション */
.eryngii-section {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin: 30px 0;
  padding: 20px;
  animation: eryngii-slide-in 0.8s ease-out forwards;
  opacity: 0;
}

@keyframes eryngii-slide-in {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.eryngii-character {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.eryngii-character img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid var(--takopi-pink);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.eryngii-name {
  margin-top: 10px;
  font-weight: bold;
  color: var(--takopi-pink);
  font-size: 1.1rem;
}

.speech-bubble {
  position: relative;
  background: #fff;
  border: 2px solid var(--takopi-pink);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  flex: 1;
}

.bubble-arrow {
  position: absolute;
  left: -15px;
  top: 30px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 15px solid var(--takopi-pink);
}

.bubble-arrow::after {
  content: "";
  position: absolute;
  left: 3px;
  top: -8px;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 12px solid #fff;
}

.speech-bubble p {
  margin: 0;
  line-height: 1.6;
}

/* リンクリスト */
.link-list {
  background-color: rgba(255,182,224,0.1);
  border-radius: 15px;
  padding: 20px;
  margin: 20px 0;
  border: 2px solid var(--takopi-light-pink);
}

.link-list p {
  margin: 0;
}

.link-list a {
  color: var(--takopi-pink);
  text-decoration: none;
  transition: all 0.3s;
}

.link-list a:hover {
  color: var(--takopi-dark-pink);
  text-decoration: underline;
}

/* ハッピーママイメージ */
.happy-mama-image {
  text-align: center;
  margin: 30px 0;
  animation: happy-mama-glow 3s ease-in-out infinite;
}

@keyframes happy-mama-glow {
  0%, 100% {
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.5));
  }
  50% {
    filter: drop-shadow(0 0 40px rgba(255,215,0,0.8));
  }
}

.happy-mama-image img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid var(--takopi-yellow);
  box-shadow: 0 0 30px rgba(255,215,0,0.5);
}

.happy-mama-image span {
  display: block;
  margin-top: 15px;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--takopi-yellow);
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* 引用ブロック */
blockquote.happy-mama-quote {
  background: linear-gradient(135deg, rgba(255,215,0,0.1) 0%, rgba(255,182,224,0.1) 100%);
  border-left: 5px solid var(--takopi-yellow);
  border-radius: 10px;
  padding: 20px 30px;
  margin: 30px 0;
  font-style: italic;
  font-weight: 700;
  color: var(--takopi-dark-pink);
  font-size: 1.2rem;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

blockquote.happy-mama-quote::before {
  content: """;
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 5rem;
  color: var(--takopi-yellow);
  opacity: 0.3;
}

blockquote.happy-mama-quote::after {
  content: """;
  position: absolute;
  bottom: -40px;
  right: 20px;
  font-size: 5rem;
  color: var(--takopi-yellow);
  opacity: 0.3;
}

/* 考察リスト */
.theory-list {
  background: linear-gradient(135deg, rgba(147,112,219,0.1) 0%, rgba(255,182,224,0.1) 100%);
  border-radius: 15px;
  padding: 25px;
  margin: 30px 0;
  border: 2px solid var(--takopi-light-pink);
}

.theory-list h4 {
  color: var(--takopi-dark-pink);
  font-size: 1.2rem;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 700;
}

.theory-list ul {
  list-style: none;
  padding: 0;
}

.theory-list li {
  padding: 10px 0 10px 30px;
  position: relative;
  border-bottom: 1px solid rgba(255,182,224,0.3);
}

.theory-list li:last-child {
  border-bottom: none;
}

.theory-list li::before {
  content: "⚡";
  position: absolute;
  left: 0;
  top: 10px;
  font-size: 1.2rem;
}

/* 変換ダイアグラム */
.transformation-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
  padding: 30px;
  background: linear-gradient(135deg, rgba(255,215,0,0.05) 0%, rgba(255,182,224,0.05) 100%);
  border-radius: 20px;
  flex-wrap: wrap;
}

.diagram-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  animation: diagram-pop 0.8s ease-out forwards;
  opacity: 0;
}

.diagram-item:nth-child(1) { animation-delay: 0.2s; }
.diagram-item:nth-child(3) { animation-delay: 0.4s; }
.diagram-item:nth-child(5) { animation-delay: 0.6s; }

@keyframes diagram-pop {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.diagram-circle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--takopi-pink) 0%, var(--takopi-light-pink) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--bg-white);
  box-shadow: 0 5px 15px rgba(255,105,180,0.3);
}

.diagram-text {
  text-align: center;
  max-width: 200px;
  background: var(--bg-white);
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  border: 2px solid var(--takopi-light-pink);
}

.diagram-text p {
  margin: 0;
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.6;
}

.diagram-arrow {
  font-size: 2rem;
  color: var(--takopi-pink);
  animation: arrow-pulse 1.5s ease-in-out infinite;
}

@keyframes arrow-pulse {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(5px);
  }
}

/* 関連記事 */
.related-articles {
  background-color: var(--bg-light);
  border-radius: 15px;
  padding: 25px;
  margin-top: 40px;
  border: 2px solid var(--takopi-light-pink);
}

.related-articles h3 {
  color: var(--takopi-dark-pink);
  font-size: 1.3rem;
  margin-bottom: 15px;
  padding-left: 0;
  text-align: center;
}

.related-articles h3::before {
  display: none;
}

.related-articles ul {
  list-style: none;
  padding: 0;
}

.related-articles li {
  margin-bottom: 10px;
  padding-left: 25px;
  position: relative;
}

.related-articles li::before {
  content: "★";
  position: absolute;
  left: 0;
  color: var(--takopi-yellow);
  font-size: 1rem;
}

.related-articles a {
  color: var(--takopi-pink);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s;
}

.related-articles a:hover {
  color: var(--takopi-dark-pink);
  padding-left: 5px;
}

/* セクション */
section {
  margin-bottom: 60px;
}

/* 段落 */
p {
  margin-bottom: 20px;
  line-height: 1.8;
}

/* リンク */
a {
  color: var(--takopi-pink);
  text-decoration: none;
  transition: all 0.3s;
}

a:hover {
  color: var(--takopi-dark-pink);
  text-decoration: underline;
}

/* フッター */
footer {
  background-color: var(--takopi-pink);
  color: var(--bg-white);
  padding: 40px 20px;
  text-align: center;
  margin-top: 60px;
}

footer a {
  color: var(--bg-white);
}

footer a:hover {
  opacity: 0.8;
}

.contact-info,
.usage-terms,
.copyright {
  margin-top: 20px;
}

/* レスポンシブデザイン */
@media screen and (max-width: 1024px) {
  /* タブレット用 */
  main {
    padding: 40px 20px;
  }

  .transformation-diagram {
    gap: 15px;
    padding: 20px;
  }

  .diagram-text {
    max-width: 150px;
    padding: 10px;
  }
}

@media screen and (max-width: 768px) {
  /* スマホ用調整 */
  main {
    padding: 30px 15px 20px;
    margin: 10px;
    border-radius: 10px;
  }

  h1 {
    font-size: 1.6rem;
    text-shadow: 2px 2px 0 var(--takopi-yellow), 4px 4px 0 var(--takopi-light-pink);
    margin: 10px 0 40px;
    padding: 0 5px;
  }

  /* モバイルでは星の装飾を小さく */
  h1::before,
  h1::after {
    font-size: 2rem;
  }

  h1::before {
    left: 10px;
  }

  h1::after {
    right: 10px;
  }

  h2 {
    font-size: 1.3rem;
    padding: 8px 10px;
    margin: 30px -5px 15px;
  }

  h2::before,
  h2::after {
    font-size: 1rem;
  }

  h2::before {
    left: -3px;
  }

  h2::after {
    right: 10px;
    top: 5px;
  }

  h3 {
    font-size: 1.05rem;
    padding-left: 15px;
    margin-bottom: 20px;
  }

  h3::before {
    left: 0;
    width: 8px;
    height: 8px;
  }

  .table-of-contents {
    padding: 15px 10px;
    margin: 0 -5px 30px;
  }

  /* エリンギセクション */
  .eryngii-section {
    flex-direction: column;
    align-items: center;
    padding: 15px;
  }

  .speech-bubble {
    margin-top: 20px;
  }

  .bubble-arrow {
    left: 50%;
    top: -15px;
    transform: translateX(-50%) rotate(90deg);
  }

  .bubble-arrow::after {
    left: 3px;
    top: -8px;
  }

  /* ハッピーママイメージ */
  .happy-mama-image img {
    width: 120px;
    height: 120px;
  }

  /* 引用ブロック */
  blockquote.happy-mama-quote {
    padding: 15px 20px;
    font-size: 1rem;
  }

  blockquote.happy-mama-quote::before,
  blockquote.happy-mama-quote::after {
    font-size: 3rem;
  }

  /* 変換ダイアグラム */
  .transformation-diagram {
    flex-direction: column;
    gap: 20px;
    padding: 20px 10px;
  }

  .diagram-arrow {
    transform: rotate(90deg);
  }

  .diagram-circle {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }

  .diagram-text {
    max-width: 100%;
    padding: 12px;
    font-size: 0.9rem;
  }

  /* 関連記事 */
  .related-articles {
    padding: 15px;
    margin: 30px -5px 0;
  }

  .related-articles h3 {
    font-size: 1.1rem;
  }

  .related-articles li {
    font-size: 0.9rem;
  }

  /* ビデオコンテナ */
  .video-container {
    margin: 20px -5px;
  }

  /* フッター */
  footer {
    padding: 30px 10px;
    font-size: 0.85rem;
  }

  footer p {
    margin-bottom: 10px;
    line-height: 1.6;
  }
}

/* アニメーションの軽量化 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* アクセシビリティ */
.sneak {
  /* 画像の遅延読み込み用クラス */
  opacity: 1;
  transition: opacity 0.3s;
}

/* プリント用スタイル */
@media print {
  body {
    background: none;
    color: #000;
  }

  header,
  footer,
  .table-of-contents,
  .video-container {
    display: none;
  }

  main {
    box-shadow: none;
    padding: 0;
  }

  h1, h2, h3 {
    color: #000;
    text-shadow: none;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
