/* Google FontsからFontを読み込み */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&family=Murecho&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Old+Standard+TT:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DotGothic16&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;700&display=swap');

/* === 共通調整 === */
body {
  margin: 0;
  font-family: 'Shippori Mincho', serif;
  color: #38ffa2;
  background: url("images/背景下地.jpg") no-repeat center top;
  background-size: cover;
  text-align: center;
  
}

/* ライトボックスの背景 */
#lightbox {
  display: none; /* 最初は非表示 */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* 拡大画像 */
#lightbox img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px #fff;
  border-radius: 8px;
  animation: fadeIn 0.3s ease;
}

/* フェードインアニメーション */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.logo {
  margin: auto;
  width: 1000px;
  max-width: 100%;
  height: auto;
  display: block;
}

.intro {
  font-family: 'Shippori Mincho', serif;
  color: #e0dda3;
  margin-top: -10px;
  margin-bottom: 10px auto;
  font-size: 15px;
  font-weight: normal;
  width: 900px;
  max-width: 100%;
  background-color: rgba(12, 7, 42, 0.943);
  display: inline-block;
  padding: 20px 20px;
  border-radius: 8px;
}

.english-introocomment{
  font-size: 3px;
  width: 300px;
  max-width: 50%;
}

/* === タブメニューのスタイルを追加 === */
.tabs-container {
  width: 100%;
  max-width: 2000px;
  margin: 0 auto;
  overflow: hidden; /* コンテナははみ出しを隠す */
}

.tabs-header {
  display: flex;
  gap: 3px; /* タブ間のスペース */
  margin-bottom: 0px;
  overflow-x: auto; /* 横スクロールを有効化 */
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch; /* スマホでスムーズスクロール */
  scroll-behavior: smooth; /* スムーズスクロール */
}

.tab-button {
  flex: 0 0 auto; /* 子要素が縮まないようにする */
  width: 300px; /* タブ画像の幅 */
  height: auto;
  cursor: pointer;
  opacity: 0.8; /* 非アクティブ時の透過度 */
  transition: opacity 0.3s ease-in-out;
}

.tab-button.active {
  opacity: 1; /* アクティブ時の透過度 */
}

/* タブコンテンツの表示・非表示 */
.tab-content {
  display: none;
  width: 100%;
  background-color: rgba(6, 0, 19, 0.87);
  border-radius: 10px;
  padding: 40px;
}

.tab-content.active {
  display: block;
}

/* === 音楽セクション（既存の.musicクラス）の調整 === */
.music {
  margin: 0; /* 親要素の.tab-contentがパディングを持つため、ここではマージンをリセット */
  padding: 0;
  width: 100%; /* 親要素の幅いっぱいに広げる */
  background-color: transparent; /* 背景色は親要素から引き継ぐため透明にする */
  border-radius: 0;
  text-align: center;
}



/* タイトル画像 */
.title-frame {
  display: block;
  margin: 20px auto;
  margin-top: 0; /* タブの切り替えと自然につなげるためにマージンをリセット */
  width: 90%;
  max-width: 500px;
  height: auto;
}

/* ジャケ写 + プレーヤー横並び */
.music-content-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 50px;
  margin-bottom: 20px;
  margin-right: 20px;
}

/* 画面幅が758px以上の場合、横並びに変更 */
@media (min-width: 758px) {
  .music-content-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }
}

.musicart {
  width: 100%;
  max-width: 500px;
  height: auto;
}

/* YouTubeリンクのデフォルトの色 */
.music a {
  color: #4efcff;
  text-decoration: none;
  font-size: 18px;
  font-weight: bold;
}

/* ホバー時の色と下線 */
.music a:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* リンクテキストを含むpタグの調整 */
.music p a {
  display: inline-block;
  margin-top: 20px;
}

/* === プレーヤー === */
.player {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
  position: relative;
  margin-left: -50px;
}

.playPause {
  width: 50px;
  height: 50px;
  background: url("images/再生ボタンスタート.png") no-repeat center/contain;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.playPause.pause {
  background: url("images/再生ボタンストップ.png") no-repeat center/contain;
}

/* シークバー */
.seek-container {
  position: relative;
  width: 400px;
  height: 40px;
  cursor: pointer;
}

.bar-frame,
.bar-played,
.bar-remaining {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: auto;
}

.bar-played {
  clip-path: inset(0 100% 0 0);
  z-index: 2;
}

.bar-remaining {
  z-index: 1;
}

.seek-handle {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  z-index: 3;
}

.bar-handle {
  width: 20px;
  height: 20px;
}

/* 再生時間表示 */
.time-display {
  font-family: 'Old Standard TT', serif;
  font-weight: 700;
  font-size: 16px;
  color: #ffffff;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
}

.time-display span {
  display: inline-block;
  min-width: 40px;
}

/* プレーヤー全体をコンパクトに調整 */
.music-player-container.compact {
  align-items: flex-start;
}

/* 再生/一時停止ボタンのサイズを調整 */
.music-player-container.compact .playPause {
  width: 50px;
  height: 50px;
}

/* シークバーのサイズを調整（横幅は広めに維持） */
.music-player-container.compact .seek-container {
  width: 400px;
  height: 28px;
}

/* 時間表示と音符の配置を調整 */
.music-player-container.compact .time-display {
  font-size: 14px;
}

/* 段落（曲名）の余白を調整 */
.music-player-container.compact p {
  margin: 5px 0;
}

/* === 音符アイコンの回転アニメーション === */
@keyframes note-rotate {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-30deg); }
  50%  { transform: rotate(0deg); }
  80%  { transform: rotate(30deg); }
  100% { transform: rotate(0deg); }
}

.note-icon {
  width: 25px;
  height: auto;
  margin-right: 5px;
  vertical-align: middle;
  transition: transform 0.2s ease-in-out;
}

.note-icon.hidden {
  opacity: 0;
  transform: scale(0.5);
}

.note-icon.visible {
  opacity: 1;
  transform: scale(1.7);
  animation: note-rotate 0.4s cubic-bezier(0.60, -0.55, 0.20, 1.55) infinite;
}

/* ジャケ写のコンテナを基準にする */
.music-art-container {
  position: relative;
  display: inline-block;
}

/* 光彩画像はジャケ写の上に重ねる */
.glow-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  z-index: 2;
}

/* 再生中にフェードインさせる */
.glow-image.active {
  opacity: 1;
}

/* === 歌詞 + コメント === */
.lyrics-comment-row {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  margin-top: 5px;
  margin-bottom: 5px;
}

@media (max-width: 767px) {
  .lyrics-comment-row {
    flex-direction: column;
    align-items: center;
  }
}

.lyrics-container {
  width: 500px;
  height: 150px;
  overflow-y: auto;
  border: 2px solid #45ffb5;
  background-color: rgba(6, 0, 19, 0.8);
  padding: 5px;
  border-radius: 7px;
}

.comment-container {
  width: 400px;
  text-align: center;
  position: relative;
}

.comment-frame {
  width: 100%;
  height: auto;
  transform: translate(-5%, -27%);
}

/* 2曲目のコメント吹き出し画像のみ個別に調整する場合 */
.music-track:nth-of-type(2) .comment-frame {
  width: 100%;
  transform: none;
}

/* YouTubeと警告文のコンテナ */
.youtube-attention-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 5px 5px 5px 5px;
}

/* 警告文のスタイル */
.attention {
  width: 250%;
  max-width: 900px;
  background: rgba(0, 0, 0, 0.5);
  padding: 8px 10px;
  border-radius: 6px;
  color: #ffff00;
  font-weight: normal;
  line-height: 1.6;
  font-size: 9px;
  font-family: "Murecho", sans-serif;
  text-align: center;
  align-items: center;
  gap: 10px;
  margin: 5px 5px 5px 5px;
  transform: translate(27%, -50%);
}

.attention p {
  margin: 2px auto;
  white-space: normal;
}

.attention p:first-child {
  font-size: 13px;
}

/* YouTube動画のコンテナ */
.youtube-box {
  width: 90%;
  max-width: 540px;
  margin: 20px auto;  /* 中央寄せ */
  transform: none;    /* これだけでOK */
  text-align: center;
}

.youtube-box p {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  transform: none;    /* 余計な transform 削除 */
}

/* iframeの中央寄せを強制 */
.youtube-box iframe {
  display: block;
  margin: 0 auto;
}

.youtube-box2 {
  width: 90%;
  max-width: 540px;
  margin: 20px auto;  /* 中央寄せ */
  transform: none;    /* これだけでOK */
  text-align: center;
  transform: translate(50%, 0%);
}

.youtube-box2 p {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
  transform: translate(25%, 0%);
}

/* iframeの中央寄せを強制 */
.youtube-box2 iframe {
  display: block;
  margin: 0 auto;
}

/*区切り横線*/
.section-divider {
  width: 105%;
  border: none;
  height: 20px;
  background-color: white;
  margin-top: 40px;
  margin-bottom: 40px;
  transform: translate(-2.5%, 100%);
}

/* === パスワード入力セクションのスタイル === */
.password-container {
  text-align: center;
  margin: 40px auto;
  padding: 20px;
  border: 2px solid #4efcff;
  border-radius: 10px;
  background-color: rgba(6, 0, 19, 0.87);
  color: #e0dda3;
  max-width: 500px;
}

.password-container input[type="password"] {
  background-color: #2a2a2a;
  border: 1px solid #4efcff;
  color: #e0dda3;
  padding: 8px;
  border-radius: 5px;
  margin-right: 10px;
}

.password-container button {
  background-color: #4efcff;
  color: #060013;
  border: none;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
}

.password-container button:hover {
  background-color: #38ffa2;
}

#passwordMessage {
  margin-top: 10px;
  font-size: 14px;
}

/* パスワードで非表示にするコンテンツの初期状態 */
.hidden-content {
  display: none;
}

.social-links {
  display: flex;
  justify-content: center; /* 中央揃え */
  gap: 20px; /* アイコンの間隔 */
  margin: 20px 0;
}

.social-links a {
  display: inline-block;
  transition: transform 0.2s ease;
}

.social-links a:hover {
  transform: scale(1.1); /* ホバー時に拡大 */
}

.social-icon {
  width: 110px;   /* 好きな大きさに調整 */
  height: 110px;
}

/* === プロフィール欄のテキスト調整 === */

/* 見出し（h2, h3, h5） */
#profile h2,
#profile h3,
#profile h5 {
  color: #00ffff;
  font-family: 'Shippori Mincho', serif; /* 既に読み込んでいるフォントを見出しに使う */
  text-align: center; /* 位置は変えずに中央 */
  margin: 20px;
}

/* 本文（p） */
.profileintro{
  text-align: left; /* 左揃え */
  color: #bcffa5;   /* 少し明るめのグレーで読みやすく */
  font-family: 'DotGothic16', sans-serif; /* 読みやすい本文用フォント */
  line-height: 1.6; /* 読みやすさ向上 */
  margin: 0.5em auto;
  width: 60%;
  max-width: 80%;   /* 横幅を少し抑えて中央寄せに見せる */
  display: block;            /* pタグをブロック要素として扱う */
  transform: translate(0%, 0%);
  
}

.profileintroEnglish-intro{
  text-align: left; /* 左揃え */
  color: #84e066;   /* 少し明るめのグレーで読みやすく */
  font-family: 'Shippori Mincho', serif; /* 読みやすい本文用フォント */
  line-height: 1.6; /* 読みやすさ向上 */
  margin: 0.5em auto;
  width: 60%;
  max-width: 80%;   /* 横幅を少し抑えて中央寄せに見せる */
  display: block;            /* pタグをブロック要素として扱う */
  transform: translate(0%, 0%);
  font-size: 12px;
}

/* 英語の紹介文の文字サイズを小さくする */
.english-intro {
  font-size: 15px; /* 好きなサイズに調整してください */
}

/* === イラストページの画像 === */
.illustrationsTabPageimage {
  max-width: 300%;     /* 画面幅に応じて縮小 */
  height: auto;       /* 縦横比を維持 */
  margin: 10px auto;  /* 間隔と中央寄せ */
  display: inline-block; /* 横並びにする */
  border-radius: 5px;
}

@media (min-width: 768px) {
  .illustrationsTabPageimage {
    max-width: 400px; /* PC表示時は幅400pxに制限 */
  }
}
/* イラスト全体をグリッドに */
#illustrationsTabPageimage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 公開されているイラスト */
#illustrationsTabPageimage > img {
  max-width: 300px;
  margin: 10px;
}

/* パスワード認証後の非公開イラスト */
#oldIllusts {
  display: none; /* ← 最初は非表示にする */
  margin-top: 20px;
  text-align: center; /* 画像を中央揃えにする */
}

  /* 非公開イラストの個別の設定 */
  #oldIllusts img {
   max-width: 90%; /* 画面幅に合わせて縮小 */
   height: auto;
   margin: 10px auto; /* 上下の余白と中央揃え */
   display: block; /* 1枚ずつ改行して表示 */
   border-radius: 5px;
  }

/* 画像を揃えて見やすく */
#oldIllusts img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

/* 趣味活ページ！！！！！ */

.hobbiesTOkonachu {
  max-width: 50%; /* 画面幅に合わせて縮小 */
  width: 20%;
   height: auto;
   margin: 10px auto; /* 上下の余白と中央揃え */
   border-radius: 5px;

}

/* パスワード認証後の非公開イラスト */
#CollegeDays {
  display: none; /* ← 最初は非表示にする */
  margin-top: 20px;
  text-align: center; /* 画像を中央揃えにする */
}

/* === 音楽プレイヤートラックの全体調整 === */
.music-player-grid {
  display: flex;
  flex-direction: column; /* 縦に並べる */
  align-items: center; /* 中央揃え */
  gap: 30px; /* プレーヤー間の縦の隙間 */
  margin: 20px auto;
  max-width: 800px;
}

/* 画面幅が768px以上の場合、横並びにする */
@media (min-width: 768px) {
  .music-player-grid {
    flex-direction: row;
    flex-wrap: wrap; /* 画面幅が足りないときに折り返す */
    justify-content: center; /* 横方向の中央揃え */
    gap: 40px; /* プレーヤー間の横の隙間 */
    transform: translate(100%, 0%);
  }
}

/* 個々のプレーヤーの幅を調整 */
.music-player-container {
  width: 100%;
  max-width: 350px; /* 各プレーヤーの最大幅を設定 */
  margin: 0;
  text-align: center;
}

/* プレーヤー内の各要素の位置を調整 */
.music-player-container p {
  text-align: center;
  margin-bottom: 10px;
}

/* プレーヤー本体（再生ボタンとシークバー）の調整 */
.player {
  justify-content: center; /* 中の要素を中央揃え */
  margin: 0 auto;
}

/* プレーヤー内のテキスト（再生時間）の調整 */
.time-display {
  justify-content: center; /* 中の要素を中央揃え */
  margin-top: 5px;
}
