/* =========================
   Music card hover effect
   index.html の Musicカード用
========================= */

.music-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.music-card-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../images/music-card.png");
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  filter: blur(1.5px) saturate(1.15);
  transition:
    opacity .25s ease,
    transform .35s ease,
    filter .35s ease;
  pointer-events: none;
}

.music-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      145deg,
      rgba(9, 9, 9, .35),
      rgba(9, 9, 9, .72)
    );
  opacity: 0;
  transition: opacity .25s ease;
  pointer-events: none;
}

.music-card:hover {
  border-color: rgba(216, 255, 95, .55);
}

.music-card:hover .music-card-art {
  opacity: .34;
  transform: scale(1);
  filter: blur(.5px) saturate(1.25);
}

.music-card:hover::after {
  opacity: 1;
}

.music-card > :not(.music-card-art) {
  position: relative;
  z-index: 2;
}


/* =========================
   Sound toggle button
   index.html のスピーカーマーク用
========================= */

.sound-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(9, 9, 9, .55);
  backdrop-filter: blur(12px);
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.sound-toggle:hover {
  background: rgba(244, 239, 231, .12);
  border-color: rgba(216, 255, 95, .55);
}

.speaker-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  color: #090909;
  background: var(--muted);
  font-size: 13px;
  line-height: 1;
}

.music-card.is-sound-on .speaker-icon {
  background: var(--accent);
}

.music-card.is-sound-on .sound-toggle {
  border-color: rgba(216, 255, 95, .6);
}

.music-card.is-sound-on .sound-text {
  color: var(--accent);
}

.sound-note {
  width: fit-content;
  margin: 12px 0 0 !important;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted) !important;
  background: rgba(9, 9, 9, .4);
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.music-card.is-sound-on .sound-note {
  color: var(--accent) !important;
  border-color: rgba(216, 255, 95, .5);
}


/* =========================
   Music page loader
   music.html 用
========================= */

.music-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(110,168,255,.14), transparent 34%),
    var(--bg);
  overflow: hidden;
  animation: musicLoaderExit .8s ease forwards;
  animation-delay: 1.8s;
}

.music-loader-logo {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: clamp(60px, 10vw, 130px);
  font-weight: 900;
  letter-spacing: -0.08em;
}

.music-loader-logo span {
  display: inline-block;
  color: var(--ink);
  animation: musicLetterFloat 1.6s ease-in-out infinite;
}

.music-loader-logo span:nth-child(1) {
  color: var(--blue);
  animation-delay: 0s;
}

.music-loader-logo span:nth-child(2) {
  animation-delay: .08s;
}

.music-loader-logo span:nth-child(3) {
  color: var(--accent);
  animation-delay: .16s;
}

.music-loader-logo span:nth-child(4) {
  animation-delay: .24s;
}

.music-loader-logo span:nth-child(5) {
  color: var(--pink);
  animation-delay: .32s;
}

.sound-bars {
  position: absolute;
  display: flex;
  gap: 7px;
  margin-top: 210px;
  align-items: end;
}

.sound-bars span {
  width: 7px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  opacity: .8;
  animation: soundBarSoft 1.2s ease-in-out infinite;
}

.sound-bars span:nth-child(2) {
  animation-delay: .12s;
  background: var(--blue);
}

.sound-bars span:nth-child(3) {
  animation-delay: .24s;
  background: var(--pink);
}

.sound-bars span:nth-child(4) {
  animation-delay: .36s;
  background: var(--blue);
}

.sound-bars span:nth-child(5) {
  animation-delay: .48s;
}

.music-loader p {
  position: absolute;
  margin-top: 300px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2em;
  opacity: .75;
}

@keyframes musicLetterFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes soundBarSoft {
  0%, 100% {
    height: 22px;
    opacity: .55;
  }

  50% {
    height: 54px;
    opacity: 1;
  }
}

@keyframes musicLoaderExit {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}
