/* Top Section */
.cnt-top-section {
  display: flex;
  justify-content: space-between;
  padding: 16px;
  min-height: 226px;
  z-index: 2;
}

.cnt-top-section.dynamic-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: #fff;
  overflow: hidden;
}

.cnt-top-section.dynamic-bg::before {
  content: '';
  position: absolute;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  inset: 0;
}

.cnt-text-wrapper,
.cnt-image-wrapper {
  position: relative;
  z-index: 1;
}

.cnt-text-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.cnt-title-wrapper {
  margin-bottom: 16px;
}

.cnt-title {
  color: #DBDBDB;
  font-size: 25px;
  font-weight: 700;
}

.cnt-artist-name,
.cnt-artist-name a {
  color: #DBDBDB;
  font-size: 16px;
  font-weight: normal;
}

.cnt-detail-wrapper {
  margin-top: auto;
  max-width: 66%;
}

.cnt-tiein {
  color: #DBDBDB;
  font-size: 12px;
  margin-bottom: 5px;
  line-height: 1.3;
}

.cnt-detail-song {
  color: #DBDBDB;
  font-size: 11px;
  margin: 0;
}

.cnt-detail-song a {
  color: #DBDBDB;
  text-decoration: underline !important;
}

.cnt-artist-name a:hover,
.cnt-detail-song a:hover {
  color: #FFFFFF;
}

.cnt-image-wrapper {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  height: 100%;
}

.cnt-action-bookmark {
  justify-content: flex-start;
  width: 59px;
  height: 32px;
  color: #DBDBDB !important;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 6px;
}

.cnt-action-bookmark svg {
  width: 24px !important;
  height: 24px !important;
  fill: currentColor;
}

.cnt-image {
  margin-left: 10px;
  width: 175px;
  height: 175px;
  flex-shrink: 0;
  box-shadow: 3px -3px 0 #999999;
  border-radius: 6px;
  overflow: hidden;
}

.cnt-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* YouTube Section */
.cnt-youtube-section {
  background: #333333;
  position: relative;
  z-index: 10;
}

.youtube-slider-wrapper {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.youtube-slider-wrapper.active {
  max-height: 630px;
}

.youtube-slider-container {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #999 #333333;
  user-select: none;
}

.youtube-slider {
  display: flex;
  gap: 16px;
  padding: 16px 8px;
  min-width: max-content;
}

.youtube-slide {
  width: 140px;
  text-align: center;
  cursor: pointer;
}

.youtube-slide:hover {
  opacity: 0.8;
}

.youtube-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  background-color: #000;
}

.youtube-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.6);
}

.youtube-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.6);
  width: 40px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.youtube-play-button svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.youtube-thumb-title {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #DBDBDB;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.youtube-player-wrapper {
  display: flex;
  justify-content: center;
}

.youtube-player {
  position: relative;
  width: 700px;
  aspect-ratio: 16 / 9;
  margin: 3em 0 1em;
  display: none;
  justify-content: center;
}

.youtube-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.youtube-close-button {
  position: absolute;
  transform: translateY(-100%);
  background: rgba(0, 0, 0, 0.7);
  color: #fff !important;
  font-size: 14px;
  cursor: pointer;
  z-index: 10;
  text-align: center;
  padding: 5px;
}

.youtube-close-button:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* Button Section */
.cnt-button-section {
  padding: 10px;
  background: #E5E5E5;
  user-select: none;
}

.cnt-button-wrapper {
  display: flex;
  gap: 10px;
}

.cnt-button-left {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.cnt-btn-listen,
.cnt-btn-video,
.cnt-btn-lyrl {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  column-gap: 2px;
  line-height: 1.4;
  padding: 6px 15px;
  background: rgba(25, 118, 210, 0.9);
  color: #fff !important;
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}

.cnt-btn-listen:hover,
.cnt-btn-video:hover {
  background-color: #1976d2;
}

.cnt-btn-lyrl {
  flex-basis: 100%;
  order: 1;
  border: 1px solid #d0d0d0;
  background-color: #ffffff;
  color: #121212 !important;
}

.cnt-btn-lyrl.no-link {
  background-color: #e7e7e7;
  cursor: default;
  pointer-events: none;
}

.cnt-btn-lyrl:hover,
.cnt-btn-lyrl.no-link:hover {
  background-color: #e7e7e7;
}

.cnt-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cnt-btn-icon svg {
  width: 14px;
  height: 14px;
  color: #fff;
  fill: currentColor;
}

.cnt-button-right {
  display: flex;
  gap: 6px;
  width: 100%;
}

.cnt-btn-grup {
  flex: 1;
  margin: 0;
  padding: 8px;
  background: #fff;
  text-align: center;
  font-size: 11px;
  border-radius: 4px;
  text-transform: uppercase;
}

.cnt-btn-title {
  padding: 3px;
  margin-bottom: 5px;
  border-radius: 4px;
  color: #fff;
  background: linear-gradient(135deg, #1976d2, #42a5f5);
}

.cnt-btn-action-wrapper {
  display: flex;
  gap: 5px;
  margin: 0;
}

.cnt-btn-action {
  flex: 1;
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
}

.cnt-btn-action:hover,
.cnt-btn-action.active:hover {
  background: linear-gradient(135deg, #42a5f5, #1976d2);
  color: #fff !important;
}

.cnt-btn-action.active {
  background: linear-gradient(135deg, #1976d2, #42a5f5);
  color: #fff;
}

/* Lyrics Section */
.cnt-lyrics-section {
  background: #fff;
  margin-bottom: 16px;
}

.cnt-lyrics-wrapper,
.cnt-note {
  margin: 0 20px 5px;
  padding: 35px 10px;
}

.cnt-lyrics {
  display: none;
  text-align: left;
  font-size: 16px;
}

.cnt-lyrics.active {
  display: block;
}

#kanji-text {
  font-size: 17px;
  color: #343330;
  letter-spacing: 1px;
}

#kanji-text div {
  margin-bottom: 8px;
}

#kanji-text div:last-child {
  margin-bottom: 0;
}

ruby {
  ruby-align: start;
  letter-spacing: 2px;
  font-family: "メイリオ", "ヒラギノ角ゴ Pro W3", "ＭＳ Ｐゴシック", sans-serif;
}

rt {
  ruby-align: center;
  font-size: 11px;
  color: #999999;
  margin-bottom: 3px;
  margin-right: 4px;
  letter-spacing: 0;
}

.furigana-off ruby rt {
  visibility: hidden;
}

/* Note Section */
.cnt-note-section {
  background: #fff;
}

.cnt-note,
.cnt-note p {
  font-size: 16px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .cnt-title {
    font-size: 22px;
  }

  .cnt-detail-wrapper {
    max-width: 100%;
  }

  .cnt-image-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .cnt-image {
    margin-left: 5px;
    width: 80px;
    height: 80px;
  }

  .cnt-action-bookmark {
    flex-direction: column;
    width: 40px;
    height: 100%;
    padding: 3px 3px 1px;
  }

  .youtube-player {
    position: fixed;
    bottom: -1px;
    z-index: 999;
    width: 100%;
    margin-bottom: 0;
    justify-content: end;
  }

  .youtube-player iframe {
    border-radius: 0;
  }
  
  .cnt-button-wrapper {
    flex-direction: column;
  }

  .cnt-btn-listen,
  .cnt-btn-video {
    flex: 1 1 0;
  }

  .cnt-lyrics-wrapper,
  .cnt-note {
    margin: 0 0 5px;
    padding: 35px 16px;
  }
}