@import url('https://fonts.googleapis.com/css2?family=Kaisei+Decol:wght@400;500;700&family=Kaisei+Opti:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Kaisei+Tokumin&display=swap');

/*ヘッダー部分開始*/
.header {
  margin: 0;
  position: fixed;
  width: 100%;
  height: 52px;
  text-align: right;
  z-index: 1000;
}

/* 背景全体をカバーする要素 */
.menu-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #fdfbef;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
  z-index: 999;
}

/* メニューを開いたときに背景色を適用 */
.menu-btn:checked~.menu-background {
  opacity: 1;
  pointer-events: auto;
}

/* ナビゲーションメニュー */
.menu {
  list-style: none;
  position: absolute;
  width: 100%;
  top: 52px;
  margin: 0;
  padding: 0;
  text-align: center;
  background-color: #fdfbef;
  transform: scale(1, 0);
  transform-origin: top;
  transition: transform 0.3s ease-in-out;
  z-index: 1001;
}

/* メニュー表示時 */
.menu-btn:checked~.menu {
  transform: scale(1, 1);
}

/* ハンバーガーボタン */
.menu-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 20px;
  right: 10px;
  width: 70px;
  height: 70px;
  background-color: #fdfbef;
  border-radius: 50%;
  cursor: pointer;
  z-index: 1002;
  border: 2px solid #d4bc89;
}

@media (max-width: 760px) {
  .menu-icon {
    width: 50px;
    height: 50px;
    top: 10px;
    right: 10px;
  }

  .menu a {
    font-size: 24px !important;
  }

  .menu li {
    padding: 10px 0 !important;
    margin: 0 20px !important;
  }
}

.menu-icon.no-border {
  border: none;
}

/* ハンバーガーボタンのアイコン */
.navicon {
  background: #000;
  display: block;
  height: 3px;
  width: 26px;
  position: relative;
  transition: 0.3s ease-in-out;
}

/* 上下のバー */
.navicon:before,
.navicon:after {
  content: "";
  display: block;
  height: 3px;
  width: 26px;
  position: absolute;
  background: #000;
  transition: 0.3s ease-in-out;
}

.navicon:before {
  top: 8px;
}

.navicon:after {
  bottom: 8px;
}

/* メニューを開いたときのハンバーガーアイコンのアニメーション */
.menu-btn:checked~.menu-icon .navicon {
  background: transparent;
}

.menu-btn:checked~.menu-icon .navicon:before {
  transform: rotate(-45deg);
  top: 0;
}

.menu-btn:checked~.menu-icon .navicon:after {
  transform: rotate(45deg);
  bottom: 0;
}

/* メニュー内のリンク */
.menu a {
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 2px;
  font-size: 50px;
  text-transform: capitalize;
  color: #000;
  opacity: 0;
  transition: opacity 0.5s;
  font-family: "Kaisei Decol", serif;
  font-weight: 700;
  font-style: normal;
}

.menu li {
  border-top: 1px solid rgb(75, 75, 75);
  padding: 15px 0;
  margin: 0 54px;
  opacity: 0;
  transition: opacity 0.5s;
}

/* メニュー表示時にテキストをフェードイン */
.menu-btn:checked~.menu a,
.menu-btn:checked~.menu li {
  opacity: 1;
}

/* メニューの表示非表示切り替え */
.menu-btn {
  display: none;
}

/*ヘッダー部分終了*/




/* フッター部分開始 */
.footer {
  padding: 2rem;
  font-size: 15px;
  color: #4b5564;
  background: #fff;
  max-width: 100%;
  margin: 0 auto;
}

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

.footer a {
  color: #4b5564;
  text-decoration: none;
}

.footer a:hover {
  color: #000;
}

.footer hr {
  height: 1px;
  border: 0;
  border-top: 1px solid #e5e7eb;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  justify-content: center;
  text-align: center;
}

.footer__navi-heading {
  font-weight: 600;
}

.footer__logo {
  display: inline-block;
  margin-bottom: 3rem;
  perspective: 1000px;
}

.footer__logo img {
  width: 100%;
  max-width: 200px;
  height: auto;
  transition: transform 1s ease;
}

.footer__logo:hover img {
  transform: rotateY(360deg);
}

.footer__navi li {
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .md-flex {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 23rem;
  }

  .md-justify-between {
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .md-flex {
    display: block;
    text-align: center;
  }

  .footer__logo {
    margin-bottom: 1.5rem;
  }

  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .footer {
    padding: 1rem;
  }

  .footer__navi-heading {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .footer__navi li {
    margin-bottom: 5px;
    font-size: 12px;
  }
}

/* フッター部分終了 */





/* ページタイトル部分開始 */
.songpage-title {
  color: #333;
  font-size: 50px;
  margin: 50px 0 -41px;
  text-align: center;
  font-family: "Kaisei Decol", serif;
  font-weight: 700;
  font-style: normal;
}

/* ページタイトル部分終了 */





/* youtube再生部分開始 */
.youtube-player-app {
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  width: 100%;
  margin-top: 50px;
}

.youtube-player-app .container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  font-family: "Kaisei Decol", serif;
  font-weight: 700;
  font-style: normal;
}

.youtube-player-app .player-wrapper {
  width: 100%;
  margin-bottom: 20px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.youtube-player-app .search-container {
  width: 100%;
  margin-bottom: 15px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.youtube-player-app .search-input {
  width: 96%;
  padding: 10px 15px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 14px;
  box-shadow: none;
  transition: all 0.3s ease;
}

.youtube-player-app .search-input:focus {
  outline: none;
  border-color: #4e90e2;
  box-shadow: 0 2px 8px rgba(78, 144, 226, 0.2);
}

.youtube-player-app .search-clear {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 16px;
  display: none;
}

.youtube-player-app .search-clear.visible {
  display: block;
}

.youtube-player-app .no-results {
  padding: 20px;
  text-align: center;
  color: #666;
}

.youtube-player-app .playlist {
  background-color: #ffffff;
  color: #333;
  border-radius: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 400px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  font-family: "Kaisei Tokumin", serif;
  font-weight: 400;
  font-style: normal;
  scrollbar-width: thin;
  scrollbar-color: #4e90e2 #f0f0f0;
  width: 100%;
}

/* Webkit (Chrome, Safari等)用のスクロールバースタイル */
.youtube-player-app .playlist::-webkit-scrollbar {
  width: 8px;
}

.youtube-player-app .playlist::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 10px;
}

.youtube-player-app .playlist::-webkit-scrollbar-thumb {
  background-color: #4e90e2;
  border-radius: 10px;
}

.youtube-player-app .playparts {
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.youtube-player-app .playparts:not(:last-child) {
  border-bottom: 1px solid #ddd;
}

.youtube-player-app .playparts:hover {
  background-color: #f0f0f0;
  transform: scale(1.01);
}

.youtube-player-app .playparts:focus {
  outline: 2px solid #4e90e2;
}

.youtube-player-app .songtitle {
  color: #222;
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.youtube-player-app .time,
.youtube-player-app .artist {
  color: #666;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.youtube-player-app .current-playing {
  color: #4e90e2 !important;
  font-weight: bold;
}


/* 曲操作部分開始 */
.music-player-controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px 20px;
  border-radius: 30px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 998;
}

.music-player-controls button {
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  width: 50px;
  height: 50px;
}


/* 再生/一時停止ボタン */
.music-player-controls #playPauseButton {
  background-color: #1db954;
}

.music-player-controls #playPauseButton:hover {
  background-color: #1ed760;
  transform: scale(1.05);
}

/* 再生アイコン（三角形） */
.music-player-controls #playPauseButton.play::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid white;
  left: 55%;
  top: 50%;
  transform: translate(-50%, -50%);
}

/* 一時停止アイコン（二本線） */
.music-player-controls #playPauseButton.pause::before,
.music-player-controls #playPauseButton.pause::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 20px;
  background: white;
  top: 50%;
  transform: translateY(-50%);
}

.music-player-controls #playPauseButton.pause::before {
  left: 34%;
}

.music-player-controls #playPauseButton.pause::after {
  right: 34%;
}

/* 前へ/次へボタン */
.music-player-controls #prevButton,
.music-player-controls #nextButton {
  background-color: #333;
}

.music-player-controls #prevButton:hover,
.music-player-controls #nextButton:hover {
  background-color: #444;
  transform: scale(1.05);
}

/* 前へボタン（左向き三角形） */
.music-player-controls #prevButton::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-right: 15px solid white;
  right: 45%;
}

/* 次へボタン（右向き三角形） */
.music-player-controls #nextButton::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 15px solid white;
  left: 45%;
}

/* 曲操作部分終了 */


@media (max-width: 760px) {

  .youtube-player-app {
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    width: 100%;
    margin: 50px 0 0 -1.8vw;
  }

  .youtube-player-app .container {
    width: 104%;
  }

  .youtube-player-app .playparts {
    padding: 8px 12px;
  }

  .youtube-player-app .playlist {
    max-height: 300px;
  }

  .youtube-player-app .player-wrapper {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 0px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    max-height: 56vw;
  }

  .youtube-player-app .search-input {
    width: 92%;
  }


}




/* 曲情報表示スタイル */
.song-info-display {
  text-align: center;
  margin: -40px 0 0 0;
  padding: 10px 15px;
  background: transparent;
  width: 100%;
  max-width: 800px;
  box-sizing: border-box;
}

.song-info-display .song-title {
  font-size: 24px;
  font-weight: 700;
  color: #333;
  margin: 8px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Kaisei Decol", serif;
}

.song-info-display .song-artist {
  font-size: 18px;
  color: #666;
  margin: 8px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: "Kaisei Tokumin", serif;
  font-weight: 500;
}

@media (max-width: 760px) {
  .song-info-display {
    margin: -30px 0 0 0;
    padding: 5px 10px;
    width: 100%;
  }

  .song-info-display .song-title {
    font-size: 20px;
  }

  .song-info-display .song-artist {
    font-size: 16px;
  }
}

/* youtube再生部分終了 */

/* 楽曲登録フォームスタイル */
.song-submission-section {
  padding: 40px 0;
  margin-top: 40px;
  border-top: 1px solid #e9ecef;
}

.song-submission-section .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.submission-toggle {
  cursor: pointer;
  user-select: none;
  text-align: center;
  padding: 15px 0;
  transition: background-color 0.3s ease;
  border-radius: 6px;
}

.submission-toggle:hover {
  background-color: rgba(0, 123, 255, 0.05);
}

.submission-title {
  font-family: "Kaisei Decol", serif;
  font-size: 28px;
  font-weight: 700;
  color: #333;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.toggle-icon {
  font-size: 20px;
  color: #007bff;
  transition: transform 0.3s ease;
}

.submission-content {
  overflow: hidden;
  transition: all 0.3s ease-in-out;
}

.submission-content.show {
  animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.submission-description {
  font-family: "Kaisei Tokumin", serif;
  font-size: 16px;
  color: #666;
  text-align: center;
  margin: 30px 0 40px 0;
  line-height: 1.6;
}

.song-submission-form {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  font-family: "Kaisei Decol", serif;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: "Kaisei Tokumin", serif;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-help {
  display: block;
  font-size: 14px;
  color: #6c757d;
  margin-top: 6px;
  font-family: "Kaisei Tokumin", serif;
}

/* YouTube埋め込みコード取得手順のスタイル */
.embed-instructions {
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 20px;
  margin-top: 15px;
  font-family: "Kaisei Tokumin", serif;
}

.instructions-title {
  font-family: "Kaisei Decol", serif;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin: 0 0 15px 0;
}

.instructions-list {
  margin: 0 0 15px 0;
  padding-left: 20px;
  color: #555;
  line-height: 1.6;
}

.instructions-list li {
  margin-bottom: 8px;
  font-size: 14px;
}

.instructions-note {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  padding: 12px;
  margin: 0;
  font-size: 14px;
  color: #856404;
  line-height: 1.5;
}

.instructions-note strong {
  font-weight: 600;
}

/* 登録前の注意書きスタイル */
.registration-notice {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  border-radius: 6px;
  padding: 15px;
  margin: 20px 0;
  font-family: "Kaisei Tokumin", serif;
}

.notice-text {
  margin: 0;
  font-size: 14px;
  color: #721c24;
  line-height: 1.6;
}

.notice-text strong {
  font-weight: 600;
  color: #721c24;
}

.submit-btn {
  display: inline-block;
  background: #6c757d;
  color: #fff;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 500;
  font-family: "Kaisei Decol", serif;
  border: 1px solid #6c757d;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.submit-btn:hover {
  background: #5a6268;
  border-color: #545b62;
}

.submit-btn:active {
  background: #545b62;
  border-color: #4e555b;
}

.submit-btn:disabled {
  background: #e9ecef;
  color: #6c757d;
  border-color: #e9ecef;
  cursor: not-allowed;
}

.submit-btn:disabled:hover {
  background: #e9ecef;
  color: #6c757d;
  border-color: #e9ecef;
}

/* メッセージスタイル */
.messages {
  margin-bottom: 30px;
}

.alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 15px;
  font-family: "Kaisei Tokumin", serif;
  font-size: 15px;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* エラーメッセージスタイル */
.error-messages {
  margin-top: 6px;
}

.error {
  display: block;
  color: #dc3545;
  font-size: 14px;
  font-family: "Kaisei Tokumin", serif;
  margin-top: 4px;
}

/* レスポンシブ対応 */
@media (max-width: 760px) {
  .song-submission-section {
    padding: 30px 0;
  }
  
  .song-submission-section .container {
    padding: 0 15px;
  }
  
  .submission-title {
    font-size: 24px;
  }
  
  .song-submission-form {
    padding: 0;
  }
  
  .form-control {
    font-size: 16px; /* iOS Safari でのズーム防止 */
  }
  
  .embed-instructions {
    padding: 15px;
    margin-top: 12px;
  }
  
  .instructions-title {
    font-size: 15px;
  }
  
  .instructions-list {
    padding-left: 18px;
  }
  
  .instructions-list li {
    font-size: 13px;
    margin-bottom: 6px;
  }
  
  .instructions-note {
    padding: 10px;
    font-size: 13px;
  }
  
  .registration-notice {
    padding: 12px;
    margin: 15px 0;
  }
  
  .notice-text {
    font-size: 13px;
  }
}