@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@700&display=swap');

html {

    box-sizing: border-box ;
    --parent-height : 20em ;
    --duration: 1s ;
    --duration-text-wrap: 12s 1.5s cubic-bezier(0.82, 0.82, 1, 1.01) ;
    --cubic-header: var(--duration) cubic-bezier(0.71, 0.21, 0.3, 0.95) ;
    --cubic-slider : var(--duration) cubic-bezier(0.4, 0, 0.2, 1) ;
    --cubic-play-list : .35s var(--duration) cubic-bezier(0, 0.85, 0.11, 1.64) ;
    --cubic-slider-context : cubic-bezier(1, -0.01, 1, 1.01) ;
    
}

html *,
html *::before,
html *::after {

    box-sizing: inherit ;

}


body{
  
    margin: 0 ;
    height: 100vh ;
    display: flex ;
	  /* ***** 关键修改：让子元素垂直堆叠 ***** */
    flex-direction: column; /* 让 .player 和 footer 垂直排列 */
    user-select: none ;
    align-items: center ;
    justify-content: center ;

    background-color: #e5e7e9 ;
    font-family: 'Quicksand', sans-serif ;
    -webkit-tap-highlight-color: transparent ;
    transition: background-color  var(--cubic-slider) ;

}  
/* 为页脚添加基本样式，确保它能占据宽度并居中 */
footer {
    /* 确保页脚能占据足够宽度 */
    width: 100%; /* 或者 max-width: 400px; 与播放器对齐 */
    max-width: 400px; /* 通常与播放器保持一致的最大宽度 */
    padding: 10px 0; /* 上下内边距 */
    text-align: center; /* 文本居中 */
    color: #555; /* 页脚文字颜色 */
    font-size: 1em; /* 适当的字号 */
    margin-top: 20px; /* 与播放器之间的间距 */
    box-sizing: border-box; /* 确保 padding 不会增加总宽度 */
}
footer a {
    color: #78adfe; /* 链接颜色，与进度条颜色相似 */
    text-decoration: none;
    margin: 0 5px;
}
footer a:hover {
    text-decoration: underline;
}

.img {

    width: 100% ;
    display: block ;
    object-fit: cover ;

}

.list {

    margin: 0 ;
    padding: 0 ;
    list-style-type: none ;

}

.flex {

    display: flex ;
    align-items: center ;
    justify-content: space-between ;

}

.uppercase{
  
    text-transform: uppercase ;
  
}

.player {


    width: 90%;          /* 宽度为屏幕宽度的 90% */
    max-width: 400px;    /* 在大屏幕上，播放器最宽不超过 400px */
   
    display: flex ;
    overflow: hidden ;
    font-size: 1.22em ;
    border-radius: 1.35em ;
    flex-direction: column ;
    background-color: white ;
    height: var(--parent-height) ;

    margin-top: 5vh; /* 将播放器从页面顶部推开一点，提供视觉空间 */
    margin-bottom: 20px; /* 播放器与页脚之间的外边距 */
}

.player__header {

    z-index: 1 ;
    gap: 0 .4em ;
    width: 100% ;
    display: flex;
    height: 5.85em ;
    flex-shrink: 0 ;
    position: relative;
    align-items: flex-start ;
    border-radius: inherit ;
    justify-content: flex-end ;
    background-color: white  ;
    padding: .95em 0.6em 0 1.2em ;
    box-shadow: 0 2px 6px 1px #0000001f ;
    transition: height var(--cubic-header), box-shadow var(--duration), padding var(--duration) ease-in-out ;

}

.player__header.open-header {

    height: 100% ;
    padding-left: 0 ;
    padding-right: 0 ;
    box-shadow: unset ;
    /* 关键：确保其子元素（包括 slider）在水平和垂直方向上居中 */




}

.player__img {

    width: 3.2em ;
    height: 3.2em ;
    border-radius: 1.32em ;

}

.player__img--absolute {
  
    top: 1.4em ;
    left: 1.2em ;
    position: absolute ;
    
}

.slider {

    flex-shrink: 0 ;
    overflow: hidden ;
    transition: width var(--cubic-header), height var(--cubic-header), top var(--cubic-header), left var(--cubic-header);
    
}

.slider.open-slider{

    top: 0 ;
    left: 0 ;
    width: 100% ;
    height: 14.6em ;

}

.slider__content {

    display: flex ;
    height: 100% ;
    transition: transform var(--cubic-slider);

}

/* 轮播中的单个专辑图片 */
.slider__img {
    filter: brightness(75%); /* 默认滤镜效果，使图片略暗 */
    /* 关键：确保每张图片在轮播带中占据其完整的 100% 宽度槽位 */
    min-width: 100%; /* 确保它总是至少占据其空间的 100% */
    max-width: 100%; /* 防止它超出其空间 */
    width: 100%; /* 默认宽度 */
    
    /* 关键：高度填充其父容器（.slider__content）的高度 */
    /* 但是，当使用 object-fit: cover 时，这个 height 会是容器高度，
       图片会按宽度填充，然后高度按比例调整，超出的部分会被裁剪。*/
    height: 100%; 
    display: block; /* 块级显示，移除图片默认的内联元素间距 */
    
    /* ***** 关键修改：将 object-fit 从 'contain' 改为 'cover' ***** */
    object-fit: cover; /* 按照宽度填充100%等比例放大，超出部分会被裁剪 */
    
    margin: auto; /* 辅助图片在其 Flex 项内居中 */
    /* 如果你之前设置了 background-color: black; 来填充留白，
       现在使用 object-fit: cover; 后，因为图片会填充整个空间，
       通常就不会有留白了，所以 background-color 可能不再需要。 */
    /* background-color: black; */ /* 如果不再需要，可以注释掉或移除 */
}

.slider__name, 
.slider__title {
  
    overflow: hidden ;
    white-space: nowrap ;

}

.text-wrap {

    display: block ;
    white-space: pre ;
    width: fit-content ;
    animation: text-wrap var(--duration-text-wrap) infinite ;

}

@keyframes text-wrap {

    75%{
      
        transform: translate3d(-51.5%, 0, 0) ;
      
    }

    100%{
      
        transform: translate3d(-51.5%, 0, 0) ;

    }
    
}

.player__button {

    all: unset ;
    z-index: 100 ;
    width: 2.5em ;
    height: 2.5em ;
    cursor: pointer ;

}

.playlist {

    transform: scale(0) ;
    transition: transform calc(var(--duration) / 2) ;
    
}

.slider.open-slider .playlist {

    transform: scale(1) ;
    transition: transform var(--cubic-play-list) ;


}

.player__button--absolute--nw {

    top: 5.5% ;
    left: 5.5% ;
    position: absolute ;
    
}

.player__button--absolute--center {
    
    top: 0 ;
    left: 0 ;
    right: 0 ;
    bottom: 0 ;
    margin: auto ;
    position: absolute ;

}

img[alt ="pause-icon"] {

    display: none ;
    
}

.player__controls {

    width: 77% ;
    gap: .5em 0 ;
    display: flex ;
    flex-wrap: wrap ;
    align-items: center ;
    will-change: contents ;
    align-content: center ;
    justify-content: center ;
    transition: transform var(--cubic-header) , width var(--cubic-header) ;

}

.player__controls.move {

    width: 88% ;
    transform: translate3d(-1.1em , calc(var(--parent-height) - 153%) , 0) ;
    
}

.player__context {

    margin: 0 ;
    width: 100% ;
    display: flex ;
    line-height: 1.8 ;
    flex-direction: column ;
    justify-content: center ;
    text-transform: capitalize ;

}

.slider__context {

    width: 56.28% ;
    cursor: pointer ;
    text-align: center ;
    padding-bottom: .2em ;
    will-change: contents ;
    transition: width var(--cubic-header) ;
    animation: calc(var(--duration) / 2) var(--cubic-slider-context) ;

}

@keyframes opacity {
   

    0% {

        opacity: 0 ;

    }

    90%{

        opacity: 1 ;

    }

}

.player__controls.move .slider__context{
    
    width: 49.48% ;

}

.player__title {

    font-size: .7em ;
    font-weight: bold ;
    color: #00000086 ;

}

.progres {

    width: 90% ;
    height: .25em ;
    cursor: pointer ;
    border-radius: 1em ;
    background-color: #e5e7ea ;
    transition: width var(--cubic-header) ;

}

.player__controls.move .progres{

    width: 98% ;
    
}

.progres__filled {

    width: 0% ;
    height: 100% ;
    display: flex ;
    position: relative ;
    align-items: center ;
    border-radius: inherit ;
    background-color: #78adfe ;
    
}

.progres__filled::before {

    right: 0 ;
    width: .35em ;
    content: " " ;
    height: .35em ;
    border-radius: 50% ;
    position: absolute ;
    background-color: #5781bd ;
    
}

.player__playlist {

    height: 100% ;
    overflow: auto ;   
    padding: 1.05em .9em 0 1.2em ; 

}

.player__playlist::-webkit-scrollbar {
    
    width: 0 ;

}

.player__song {

/*     gap: 0 .65em ; */
    display: flex ;
    cursor: pointer ;
    margin-bottom: .5em ;
    padding-bottom: .7em ;
    border-bottom: .1em solid #d8d8d859 ;

}

.player__song .player__context {

    line-height: 1.5 ;
    margin-left: .65em ;

}

.player__song-name {

    font-size: .88em ;

}

.player__song-time {

    font-size: .65em ;
    font-weight: bold ;
    color: #00000079 ; 
    height: fit-content ;
    align-self: flex-end ;

}

.audio {

    display: none !important ;

}
/* --- 全屏图片查看器样式 --- */
.full-screen-image-viewer {
    position: fixed; /* 固定定位，覆盖整个视口 */
    top: 0;
    left: 0;
    width: 100vw; /* 占据整个视口宽度 */
    height: 100vh; /* 占据整个视口高度 */
    background-color: rgba(0, 0, 0, 0.9); /* 半透明黑色背景 */
    display: flex; /* 使用 Flexbox 居中其内容 */
    justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
    z-index: 10000; /* 确保它在所有内容之上 */

    /* ***** 关键：默认隐藏样式 ***** */
    opacity: 0; /* 初始时完全透明 */
    visibility: hidden; /* 初始时不可见，不占据空间 */
    transition: opacity 0.3s ease, visibility 0.3s ease; /* 添加过渡效果 */
}

/* 当 viewer 带有 'open' 类时，才显示它 */
.full-screen-image-viewer.open {
    opacity: 1; /* 完全显示 */
    visibility: visible; /* 可见 */
}

/* 查看器内部的图片样式 */
.full-screen-image-viewer img {
    max-width: 90vw; /* 限制最大宽度，留出边距 */
    max-height: 90vh; /* 限制最大高度，留出边距 */
    object-fit: contain; /* 确保图片完整显示，不裁剪，会留白 */
    display: block; /* 移除图片默认的内联元素间距 */
}

/* 关闭按钮样式 */
.full-screen-image-viewer .close-viewer-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10001; /* 确保在图片之上 */
}