.header {
  position: static;
}

/* ! Y方向 縦方向 */
/* スクロールスナップのメインコンテナ */
.scroll-main-div {
  scroll-snap-type: y mandatory;
  /* Y軸方向の強制的なスクロールスナップを有効化 */
  overflow-y: scroll;
  /* 縦スクロールを可能にする */
  height: 100vh;
  /* ビューポートの高さに設定 */
}

/* 各スクロールセクションのコンテナ */
.scroll-container {
  scroll-snap-align: start;
  /* 要素の開始位置でスナップ */
  height: 100vh;
  /* 各セクションを画面の高さに設定 */
}

/* スクロールセクション内のコンテンツエリア */
.scroll-section {
  width: 100%;
  /* 幅を100%に設定 */
  height: 100%;
  /* 高さを100%に設定 */
}

/* スクロール表示される画像 */
.scroll-img {
  width: 100%;
  /* 幅を100%に設定 */
  height: 100%;
  /* 高さを100%に設定 */
  object-fit: cover;
  /* 画像のアスペクト比を保持しつつ要素全体を覆う */
  object-position: center;
  /* 画像の中央部分を表示 */
}

/* !  X方向 横方向 */
/* 横方向のスクロールスナップのメインコンテナ */
.X-scroll-main-div {
  scroll-snap-type: x mandatory;
  /* X軸方向の強制的なスクロールスナップを有効化 */
  overflow-x: scroll;
  /* 横スクロールを可能にする */
  overflow-y: hidden;
  /* 縦スクロールを無効にする */
  width: 100%;
  /* 各セクションを画面の幅に設定 */
  height: 100vh;
  /* ビューポートの高さに設定 */
  display: flex;
  /* フレックスボックスを使用して横並びにする */
  justify-content: flex-start;
  /* コンテンツを左端から開始 */
  align-items: center;
  /* コンテンツを垂直方向に中央に配置 */
  scroll-behavior: smooth;
  /* スムーズなスクロール動作 */
}

/* 各横スクロールセクションのコンテナ */
.X-scroll-container {
  scroll-snap-align: start;
  /* 要素の開始位置でスナップ */
  width: 100%;
  /* 各セクションを画面の幅に設定 */
  height: 100vh;
  /* 各セクションを画面の高さに設定 */
  flex-shrink: 0;
  /* コンテナが縮小されないようにする */
  display: flex;
  /* フレックスボックスを使用 */
  justify-content: center;
  /* 水平方向に中央配置 */
  align-items: center;
  /* 垂直方向に中央配置 */
}

/* 横スクロールセクション内のコンテンツエリア */
.X-scroll-section {
  width: 100%;
  /* 幅を100%に設定 */
  height: 100%;
  /* 高さを100%に設定 */
}

/* 横スクロール表示される画像 */
.X-scroll-img {
  width: 100%;
  /* 幅を100%に設定 */
  height: 100%;
  /* 高さを100%に設定 */
  object-fit: cover;
  /* 画像のアスペクト比を保持しつつ要素全体を覆う */
  object-position: center;
  /* 画像の中央部分を表示 */
}

/* !  Animate.css */
.test-css-p {
  animation: bounce;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
  animation-duration: 2s;
  /* デフォルトのアニメーション時間 */
}

/* AOS 複数画像応用 */
.aos-multiple {
  display: flex;
  flex-wrap: wrap;
  /* 複数の画像を折り返して表示 */
  gap: 16px;
}

@media screen and (max-width: 480px) {
  .aos-multiple {
    flex-direction: column;
    /* スマートフォンでは縦に並べる */
  }

  .aos-img {
    width: 100%;
    /* スマートフォンでは画像を全幅に */
    height: auto;
    /* 高さは自動調整 */
  }
}

/* ! Chartist.js シンプルな円グラフ */
.chart-round {
  width: 100%;
  /* 幅を100%に設定 */
  height: 400px;
  /* 高さを400pxに設定 */
  margin: 0 auto;
  /* 中央寄せ */
}

/* 円グラフ専用のラベル */
.ct-chart-pie .ct-label {
  font-size: 24px;
  fill: #fff;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* ! 円グラフ応用 */
.ct-series-d .ct-slice-pie {
  fill: black;
}

.ct-series-e .ct-slice-pie {
  fill: green;
}

/* ! Chartist.js 棒グラフ */
.chart-lod {
  width: 100%;
  /* 幅を100%に設定 */
  height: auto;
  /* 高さは自動調整 */
  margin: 0 auto;
  /* 中央寄せ */
}

/* ! 棒グラフ専用のラベル */
.ct-chart-bar .ct-label {
  font-size: 10px;
  text-anchor: middle;
  /* ラベルを中央に配置 */
  font-weight: bold;
  /* ラベルを太字に */
  color: tomato;
}

.ct-series-a .ct-bar {
  stroke: gray;
}

.ct-bar {
  stroke-width: 15%;
}

/* ! Google Charts 円グラフ */
#chart-div {
  width: 100%;
  max-width: 600px;
  height: 400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

#piechart_3d {
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ! Scroll Magic 使用例 */
.main-container {
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.project {
  /* アニメーション設定 */
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  text-align: center;
  margin: 50px;
}

.project.fade-in {
  opacity: 1;
  transform: translateY(0);
}

.img {
  width: 200px;
  height: 200px;
  background-color: rgb(82, 107, 195);
  border-radius: 50%;
  margin: 0 auto;
}

.img {
  width: 200px;
  height: 200px;
  background-color: rgb(82, 107, 195);
  border-radius: 50%;
}

/* ! ScrollMagic デバッグ表示のフォント変更 - より強力なセレクタ */
body div[style*="position"][style*="fixed"] {
  font-family: 'Courier New', monospace !important;
  font-size: 22px !important;
  font-weight: 900 !important;
}

/* ! ScrollMagic 細かい設定 */
.trigger-hook-diagram {
  margin: 20px 0;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.trigger-hook-diagram h3 {
  margin-bottom: 15px;
  text-align: center;
  font-size: 18px;
  color: #333;
}

.screen-diagram {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.screen-box {
  position: relative;
  width: 300px;
  height: 400px;
  border: 3px solid #333;
  background-color: #fff;
  border-radius: 8px;
}

.screen-content {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 50px 0;
}

.screen-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.trigger-line {
  position: relative;
  width: 100%;
  height: 2px;
  background-color: red;
}

.trigger-0 {
  position: absolute;
  top: 0;
  background-color: #ff6b6b;
}

.trigger-05 {
  background-color: #4ecdc4;
}

.trigger-08 {
  background-color: #45b7d1;
}

.trigger-1 {
  position: absolute;
  bottom: 0;
  background-color: #96ceb4;
}

.trigger-label {
  position: absolute;
  left: 110%;
  top: -10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: bold;
  color: #333;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 2px 5px;
  border-radius: 3px;
}

@media (max-width: 768px) {
  .screen-box {
    width: 250px;
    height: 350px;
  }

  .trigger-label {
    font-size: 10px;
    left: 105%;
  }
}

.btn-debug-no,
.btn-debug-on {
  background-color: #007bff;
  padding: 10px;
  border-radius: 14px;
}

/* ! GSAP */
.gaap-div {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-direction: column;
}
.box1,
.box2,
.box3 {
  width: 100px;
  height: 100px;
  display: block;
}


.box1 {
  background-color: #ff6b6b;
}

.box2 {
  background-color: #4ecdc4;
}

.box3 {
  background-color: #45b7d1;
}

/* ! GSAPデモサイト */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: black;
  height: auto;
  overflow-x: hidden;
}

.gasp-inner {
  text-align: center;
}

.gasp-inner .gasp-link {
  font-size: 2rem;
  font-weight: bold;
}

.gasp-inner .gasp-link:hover {
  color: red;
}

.container {
  max-width: 90%;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  color: white;
  margin-bottom: 40px;
}

.main-title {
  font-size: 3em;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
  font-size: 1.2em;
  opacity: 0.9;
}

.demo-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.demo-card {
  background: white;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  width: 100%;
  max-width: 90%;
  margin: 0 auto;
}

.demo-card:hover {
  transform: translateY(-5px);
}

.demo-title {
  font-size: 1.5em;
  color: #333;
  margin-bottom: 15px;
  text-align: center;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.demo-area {
  min-height: 500px;
  border: 2px dashed #ddd;
  border-radius: 10px;
  position: relative;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.btn {
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 1.5rem;
  margin: 5px;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.controls {
  text-align: center;
}

.box {
  width: 60px;
  height: 60px;
  background: #ff6b6b;
  border-radius: 8px;
  cursor: pointer;
}

.circle {
  width: 50px;
  height: 50px;
  background: #4ecdc4;
  border-radius: 50%;
}

.text-element {
  font-size: 18px;
  font-weight: bold;
  color: #333;
  text-align: center;
}

.morphing-shape {
  width: 60px;
  height: 60px;
  background: #f9ca24;
  border-radius: 8px;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #764ba2);
  width: 0%;
  border-radius: 10px;
}

.particle {
  width: 8px;
  height: 8px;
  background: #ff6b6b;
  border-radius: 50%;
  position: absolute;
}

.wave {
  width: 200px;
  height: 100px;
  background: linear-gradient(45deg, #4ecdc4, #45b7d1);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.card-3d {
  width: 150px;
  height: 100px;
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transform-style: preserve-3d;
}

.svg-demo {
  width: 200px;
  height: 150px;
}

.physics-ball {
  width: 30px;
  height: 30px;
  background: #ff6b6b;
  border-radius: 50%;
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
}

.clock-demo {
  width: 120px;
  height: 120px;
  border: 4px solid #333;
  border-radius: 50%;
  position: relative;
  margin: 20px auto;
}

.clock-hand {
  position: absolute;
  background: #333;
  transform-origin: bottom center;
  border-radius: 2px;
}

.hour-hand {
  width: 4px;
  height: 40px;
  top: 20px;
  left: 50%;
  margin-left: -2px;
}

.minute-hand {
  width: 2px;
  height: 50px;
  top: 10px;
  left: 50%;
  margin-left: -1px;
}

.center-dot {
  width: 8px;
  height: 8px;
  background: #333;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.fullscreen-demo {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  text-align: center;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.floating-elements {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

.floating-element {
  position: absolute;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.demo-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.code-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #ddd;
}

.code-tab {
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-bottom: none;
  padding: 8px 16px;
  cursor: pointer;
  margin-right: 2px;
  border-radius: 5px 5px 0 0;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.code-tab.active {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

.code-tab:hover {
  background: #e9ecef;
}

.code-tab.active:hover {
  background: #5a6fd8;
}

.code-display {
  display: none;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 0 0 5px 5px;
  padding: 0;
  margin-bottom: 15px;
  height: auto;
  overflow-y: auto;
}

.code-display.active {
  display: block;
}

.code-display pre {
  margin: 0;
  padding: 15px;
  background: #2d3748;
  color: #e2e8f0;
  border-radius: 0 0 5px 5px;
  font-size: 2rem;
  line-height: 1.4;
  overflow-x: auto;
}

.code-display code {
  font-family: 'Courier New', Consolas, 'Monaco', monospace;
}

.show-code-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 20px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1.5rem;
  margin: 8px auto;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
}

.show-code-btn:hover {
  background: #218838;
}

.hide-code {
  display: none;
}