* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
 /*    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif; */
}

/* 确保拼音在所有设备上都显示在文字上方 */
ruby {
    display: inline-block;
    text-align: center;
    line-height: normal;
    ruby-position: over;
}

rt {
    display: block;
    font-size: 0.6em;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    text-indent: 0;
    margin: 0;
    padding: 0;
}

/* 针对移动设备的媒体查询，确保拼音始终在文字上方 */
@media screen and (max-width: 768px) {
    ruby {
        ruby-position: over !important;
        -webkit-ruby-position: over !important;
    }
    
    rt {
        display: block !important;
        position: relative !important;
        top: auto !important;
        bottom: auto !important;
    }
}



/* 容器与布局 */
.container {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh;
    display: block;
    overflow-y: auto;
    position: static;
    padding-top: 60px;
    padding-bottom: 0; /* 去掉下方的预留空间 */
}

/* 顶部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    display: flex;
    height: 60px;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
//    background: rgba(26, 26, 46, 0.3);
}
 

.title-container {
    text-align: center;
    flex-grow: 1;
    font-size: 16px;
    text-shadow: rgb(0, 0, 0) 1px 1px 0px, rgb(0, 0, 0) -1px -1px 0px, rgb(0, 0, 0) 1px -1px 0px, rgb(0, 0, 0) -1px 1px 0px;
}

}

.title {
 //   font-size: 18px;
    font-weight: 500;
    margin-bottom: 4px;
}

.author-name {
//    font-size: 16px;
//    color: rgba(255, 255, 255, 0.7);
    font-weight: normal;
}

/* 专辑封面区域 */
.album-art {
    width: 230px;
    height: 230px;
    margin: 20px auto 0;
    border-radius: 50%; 
    background: linear-gradient(45deg, rgba(200, 200, 200, 0.6), rgba(80, 80, 80, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    object-fit: cover;
    overflow: hidden; 
}

.album-art img {
    width: 95%;
    height: 95%;
    border-radius: 50%;
    object-fit: cover;
}

/* 外围方形点击容器（透明，仅用于扩大点击区域，不改变鼠标形态） */
.album-art-wrapper {
    width: 230px;
    height: 230px; /* 保持原始布局尺寸 */
    margin: 1px auto 0;
    position: relative;
    display: block;
    background: transparent;
    overflow: visible; /* 允许可点击扩展区域溢出，不挤占布局 */
}
/* 使用伪元素在容器底部向下扩展10px点击区域（不改变布局） */
.album-art-wrapper::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 25px; /* 扩展点击区域高度，总计向下延伸 25px */
    bottom: -25px; /* 向下延伸 25px */
    background: transparent;
    pointer-events: auto; /* 保持可点击，事件由父容器接收 */
}


.album-art.playing::before {
    animation-play-state: running;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 歌曲信息 */
.track-info {
    text-align: center;
    padding: 0 20px;
    margin-top: 20px;
}

.track-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.artist-name {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
}








 
 





.cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
}  





/* 短字幕模式：强制使用110px底部偏移，覆盖可能残留的内联样式 */
/* 基础：进度容器默认隐藏，由模式选择器决定显示 */
.progress-container {
    position: fixed;
    bottom: 110px;
    left: 0;
    right: 0;
    padding: 0 30px;
    z-index: 5;
    display: none;
}

/* 进度条（progress-container/progress/progress-time）显示/隐藏统一整理：四个场景 */

/* 1) 竖屏短字幕：显示 */
@media (orientation: portrait) {
  body:not(.long-mode) .progress-container {
    display: block;
    bottom: 110px !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: auto !important;
  }
}

/* 2) 竖屏长字幕：显示（保留纵向布局细节在下方对应样式） */
@media (orientation: portrait) {
  body.portrait-long-mode.long-mode .progress-container {
    display: none;
  }
}

/* 3) 横屏普通模式：显示 */
@media (orientation: landscape) {
  body:not(.fullscreen-mode) .progress-container {
    display: block;
    bottom: 110px !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    width: auto !important;
  }
}

/* 4) 横屏全屏模式：显示 */
@media (orientation: landscape) {
  body.fullscreen-mode .progress-container {
    display: block;
    bottom: 2vh !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 85vw !important;
  }
}

/* 进度时间文本基础样式 */
.progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px; /* 进度条高度从4px增加到8px */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px; /* 随高度增大，圆角同步加倍以保持视觉一致 */
    position: relative;
    cursor: pointer;
}

.progress {
    width: 30%;
    height: 100%;
    background: linear-gradient(to right, #8e2de2, #4a00e0);
    border-radius: 2px;
    position: relative;
    transition: width 0.3s ease; /* 正常播放时的过渡效果 */
    visibility: hidden; /* 默认隐藏，JS控制显示 */
}

/* 临时禁用所有过渡和动画 */
.progress.no-transition {
    transition: none !important;
    transition-property: none !important;
    animation: none !important;
}

/* 基础：迷你播放按钮默认不显示，特定模式下再开启 */
.mini-play-btn { display: none; }

.progress::after {
    content: "";
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    /* 灰色投影，增强立体感 */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.30),
                0 1px 3px rgba(0, 0, 0, 0.18);
    z-index: 5;
}

/* 交互内容容器 */
.jiaohu-container {
    position: fixed;
    display: flex;
    left: 0;
    right: 0;
    gap: 20px;
    align-items: center;
    justify-content: center;
    bottom: 130px;
}

.favorite-btn {
    width: 30px;
    height: 30px;
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorite-btn.active {
    background-image: url('/images/fav.png');
}

.favorite-btn.inactive {
    background-image: url('/images/favnone.png');
}

/* 控制按钮 */
.controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    height: 120px;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px 20px;
}

.control-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
//    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.control-btn i {
    font-size: 20px;
}

.play-btn {
    width: 70px;
    height: 70px;
}

.play-btn i {
    font-size: 30px;
}

 .play-icon {
     width: 40px;
     height: 40px;
     object-fit: contain;
 }

/* 播放模式按钮 */
.mode-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    color: rgba(255, 255, 255, 0.7);
}

/* 横屏普通模式：容器最大宽度限定为 80vw（仅在非全屏）*/
@media (orientation: landscape) {
    body:not(.fullscreen-mode) .container {
        max-width: 80vw !important;
    }
}


.mode-btn.active, #open-playlist:hover {
    color: #8e2de2;
    background: rgba(255, 255, 255, 0.1);
}

.mode-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.mode-btn.active .mode-icon {
    filter: brightness(1) invert(0);
    transform: scale(1.1);
}

.mode-icon {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
     filter: brightness(0) invert(1);
    transition: all 0.2s;
}

/* 播放列表侧边栏 */
.playlist-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    padding: 20px;
    transition: transform 0.3s ease;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.playlist-sidebar.show {
    transform: translateX(-300px);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.playlist-title {
    font-size: 20px;
    font-weight: 500;
}

.close-playlist {
    font-size: 24px;
    cursor: pointer;
}

.playlist-tabs {
    display: flex;
    overflow-x: auto;
    margin: 0 0 15px 0;
    padding-bottom: 5px;
    flex-shrink: 0;
}

.playlist-tab {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    margin-right: 10px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
}

.playlist-tab.active {
    background: linear-gradient(to right, #8e2de2, #4a00e0);
}

.playlist-items {
    flex-grow: 1;
    position: relative;
    overflow-y: auto;
    padding-right: 5px;
    margin-top: 10px;
}

.playlist-item {
    padding: 12px 15px;
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
    background: rgba(142, 45, 226, 0.2);
    border-left: 3px solid #8e2de2;
}

.item-number {
    width: 25px;
    color: rgba(255, 255, 255, 0.6);
    margin-right: 10px;
}

.item-info {
    flex-grow: 1;
}

.item-title {
    font-size: 15px;
    margin-bottom: 3px;
}

.item-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
}

.overlay.show {
    display: block;
}

.album-art.hidden {
    display: none;
}

/* 顶栏（header）可见性统一由模式类控制 */
@media (orientation: portrait) {
  body.portrait-long-mode .header { display: none !important; }
}
@media (orientation: landscape) {
  body.fullscreen-lyric-mode .header { display: none !important; }
}

/* 竖屏长字幕模式：顶部内边距分离，移除 JS 切换，避免视觉下跳 */
body.portrait-long-mode .container {
  padding-top: 0 !important;
}

/* 竖屏短字幕：显式指定默认顶部内边距值（60px），保证在切换后稳定 */
@media (orientation: portrait) {
  body:not(.portrait-long-mode) .container {
    padding-top: 60px !important;
  }
}

/* 横屏全屏歌词模式：同样取消顶部内边距 */
@media (orientation: landscape) {
  body.fullscreen-lyric-mode .container {
    padding-top: 0 !important;
  }
}

/* 横屏下长字幕内容高度使用比例，避免固定像素 */
@media (orientation: landscape) {
  .long-lyrics-container .lyric-content {
      height: 65vh;
  }
}

/* 横屏普通（控件显示）下：独立命名 landscape-lyric-mode，使用长字幕容器并设置内容高度 65vh */
@media (orientation: landscape) {
  body.landscape-lyric-mode .long-lyrics-container {
    display: block !important;
  }
  body.landscape-lyric-mode #lyric-content {
    height: 65vh;
    overflow-y: auto;
  }
  body.landscape-lyric-mode .lyrics-container {
    display: none !important;
  }
}
.portrait-long-mode .progress-container {
    position: fixed;
    left: 50%;
    transform: translateX(-50%); /* 水平居中容器 */
    bottom: 19px; /* 距离底部 19px */
    width: 65%; /* 将容器宽度改为 65% */
    z-index: 9999;
    display: none; /* 竖屏长字幕下隐藏进度条容器及其内容 */
    align-items: center; /* 垂直居中，保证进度条与时间码对齐 */
    justify-content: center; /* 水平居中内部内容 */
    gap: 0px; /* 取消统一间距，单独控制进度条与时间码距离 */
    background: #ffffff; /* 白色背景 */
    border-radius: 999px; /* 两头圆角，形成胶囊形容器 */
    padding: 0; /* 移除内边距 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); /* 轻微阴影提升层次感 */
}

/* 竖屏长字幕：进度条缩短、靠右；时间码全部靠右并以斜杠分隔 */
.portrait-long-mode.long-mode #progress-bar {
    flex: 0 0 50%; /* 进度条宽度为50% */
    margin: 0 auto; /* 进度条在容器内居中 */
    order: 2; /* 位于时间码之前 */
    height: 10px; /* 提升厚度，形成长方体条状 */
    background: #e0e0e0; /* 浅灰色容器背景 */
    border-radius: 999px; /* 两端圆角，形成胶囊形状 */
}
/* 合并整理：竖屏长字幕下进度条隐藏，移除该模式的进度条与时间码细化样式 */
/* 原 portrait-long-mode.long-mode 下 progress/progress-time 细化规则已删除，避免冲突与冗余。 */

/* 竖屏模式：右下角小播放按钮（扩展点击区域 +10px，并增加圆形半透明容器）*/
.portrait-long-mode .mini-play-btn {
     display: flex;
     align-items: center;
     justify-content: center;
     width: 44px; /* 紧凑尺寸（触控推荐最小44px） */
     height: 44px; /* 紧凑尺寸 */
     padding: 0; /* 不用额外内边距 */
     cursor: pointer;
     background: #ffffff !important; /* 白色圆形容器 */
     border-radius: 50%; /* 圆形 */
     position: fixed;
     right: 2px; /* 改到右下角 */
     bottom: 2px; /* 底部距离 */
     z-index: 10000; /* 置顶确保可点击 */
     box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* 轻微阴影 */
 }
/* 半透明圆形容器，大小与可点击区域一致（置于图标下方，避免泛灰）*/
.portrait-long-mode .mini-play-btn::before {
    content: none; /* 移除半透明叠层，避免与白色圆形容器重叠 */
}
.portrait-long-mode .mini-play-btn .play-icon {
    width: 24px; /* 与44px容器匹配的更紧凑图标 */
    height: 24px; /* 与44px容器匹配的更紧凑图标 */
    object-fit: contain;
    position: relative;
    z-index: 1;
}

/* 合并整理：竖屏长字幕下进度条隐藏，移除该模式的进度条定位与时间码样式 */
/* 原 portrait-long-mode.long-mode 下 progress-container/progress-time 规则已删除，避免冲突与冗余。 */

/* 竖屏长字幕模式：锁定页面滚动，改为字幕容器内滚动，避免整体上移错位（横屏不应用长字幕特征） */
.portrait-long-mode.long-mode,
.portrait-long-mode.long-mode .container {
    overflow: hidden;
}
body.portrait-long-mode .controls,
body.portrait-long-mode .jiaohu-container,
body.portrait-long-mode .cover-overlay,
body.portrait-long-mode .album-art {
  display: none !important;
}
body.portrait-long-mode .long-lyrics-container {
  height: 100vh;
  max-height: 100vh;
  min-height: 100vh;
}
body.portrait-long-mode #lyric-content {
  height: 100%;
  max-height: 100%;
  min-height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

/* 当控制按钮隐藏时，进度条也隐藏（通用规则）*/
body.controls-hidden .progress-container {
  /* display: none; */
}

/* 横屏全屏并且控制隐藏时，进度条隐藏（覆盖全屏显示规则）*/
@media (orientation: landscape) {
  body.fullscreen-mode.controls-hidden .progress-container {
    /* display: none; */
  }
}

/* 专用类：仅当明确标记 progress-hidden 时隐藏进度条 */
body.progress-hidden .progress-container {
  display: none;
}

/* 横屏全屏（控件隐藏）下：长字幕容器高度 90vh，内容填充满容器（独立命名：fullscreen-lyric-mode） */
@media (orientation: landscape) {
  body.fullscreen-lyric-mode .long-lyrics-container {
    display: block !important;
    height: 90vh;
    max-height: 90vh;
    min-height: 90vh;
  }
  body.fullscreen-lyric-mode #lyric-content {
    height: 100%;
    max-height: 100%;
    min-height: 100%;
    overflow-y: auto;
  }
  body.fullscreen-lyric-mode .album-art {
    display: none !important;
  }
  body.fullscreen-lyric-mode .lyrics-container {
    display: none !important;
  }
}
