* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}


body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #000000;
  color: #f4f4f5;
}

.header {
  padding: 16px 24px;

  .title{
    h1{
      margin: 0;
      font-size: 36px;
    }
    p{
      margin: 4px 0 0;
      font-size: 16px;
      color: #9CA3AF;
    }
  }
}

.main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px;

  .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;

    .view-toggle {
      display: flex;
      align-items: center;
      gap: 8px;

      button {
        border: 1px solid rgba(148, 163, 184, 0.6);
        background: transparent;
        color: #e5e7eb;
        padding: 6px 12px;
        border-radius: 999px;
        cursor: pointer;
        font-size: 13px;

        &.active {
          background: #63BCF7;
          border-color: #63BCF7;
          color: #020617;
        }
      }
    }
    
  }
}





/* 音樂列表 */

.music-list {
  display: grid;
  gap: 12px;
}

.view-card {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.view-list {
  grid-template-columns: 1fr;
}

.music-card {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  cursor: pointer;
  min-height: 65px;
  transition: transform 0.12s ease, box-shadow 0.12s ease,
  border-color 0.12s ease;
}

.music-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.7);
  border-color: #63BCF7;
}

/* 縮圖 */

.thumb-wrapper {
  flex: 0 0 120px;
  border-radius: 10px;
  overflow: hidden;
  background: #020617;

  img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

}

/* 純文字模式：隱藏縮圖 */

.view-list .thumb-wrapper {
  display: none;
}

/* 內容 */

.music-content {
  flex: 1;
  min-width: 0;
  position: relative;

  .title-row {
    align-items: baseline;
    gap: 6px;
    margin-bottom: 4px;

    .music-title {
      font-size: 15px;
      max-width: 80%;
      max-height: 19px;
      overflow: hidden;
    }

    .music-artist {
      margin-top: 2px;
      font-size: 13px;
      color: #9ca3af;
    }
  }
  .meta-row {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 11px;
    color: #63BCF7; 
    position: absolute;
    bottom: 0px;
    right: 10px;

    .open-link {
      text-decoration: none;
      font-size: 14px;
    }
    i{
      font-size: 16px;
      margin-left: 5px;
    }
  }
}




/* skeleton / 載入中文字 */

.skeleton {
  background: linear-gradient(
    90deg,
    rgba(30, 64, 175, 0.1),
    rgba(15, 23, 42, 0.6),
    rgba(30, 64, 175, 0.1)
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}

.skeleton-text {
  height: 14px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.9);
  margin: 4px 0;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.btm-paper{
  margin-top: 10px;
  display: flex;
  justify-content: center;

  &>div{
    .pager {
      display: flex;
      align-items: center;
      gap: 8px;

      button{
        border-radius: 999px;
        border: 1px solid rgba(148, 163, 184, 0.6);
        background: transparent;
        color: #e5e7eb;
        padding: 4px 10px;
        font-size: 13px;
        cursor: pointer;

        &:disabled {
          opacity: 0.4;
          cursor: default;
        }
      }
      span{
        font-size: 13px;
        color: #9CA3AF;
      }
    }
  }
}

/* Footer */

.footer {
  padding: 12px 16px;
  text-align: center;
  font-size: 12px;
  color: #9CA3AF;
  margin-top: 20px;
}

a {
  color: inherit;
}
