@charset "utf-8";

/* 基础重置 */
blockquote, body, button, dd, dl, dt, fieldset, form, h1, h2, h3, h4, h5, h6, hr, html, input, lengend, li, ol, p, pre, td, textarea, th, ul {
    margin: 0;
    padding: 0;
}
li { list-style: none; }
img { border: 0 none; }
button { cursor: pointer; }
a { color: #fff; text-decoration: none; }
a:hover { color: #31c27c; }
a:focus, button:focus, input:focus { outline: 0; }
.hidden { display: none !important; }

html, body {
    height: 100%;
    width: 100%;
    background-color: #000;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}

body {
    /* 参照 Music-main: 深色渐变背景 */
    background: #000;
    background-image: -webkit-linear-gradient(200deg, #7f7280, #000);
    background-image: linear-gradient(200deg, #7f7280, #000);
    overflow: hidden;
    font-family: 'PingFang SC', 'Microsoft YaHei', Tahoma, Arial, sans-serif;
    -webkit-user-select: none;
    user-select: none;
}

/* 模糊背景层 */
#blur-img {
    position: fixed;
    height: 100%;
    left: -10%;
    width: 120%;
    overflow: hidden;
    z-index: 0;
}
#mobile-blur {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    background-size: cover;
    background-position: center;
    -webkit-filter: blur(50px);
    filter: blur(50px);
    -webkit-transform: scale(1.15);
    transform: scale(1.15);
}
.blur-mask {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: #000;
    opacity: 0.6;
    z-index: 1;
}

/* 主界面 */
#app {
    position: relative;
    z-index: 2;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
    flex-direction: column;
    height: 100%;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px calc(env(safe-area-inset-bottom, 0px) + 16px) 20px;
    box-sizing: border-box;
    color: #fff;
}

/* ===== 顶部:封面与信息 ===== */
.top-section {
    text-align: center;
    padding-top: 20px;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
}
.cover-frame {
    width: 62vw;
    max-width: 320px;
    height: 62vw;
    max-height: 320px;
    margin: 0 auto 16px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-sizing: border-box;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.cover-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}
/* 封面缺失时的兜底占位 */
.cover-fallback {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 10px;
    background: -webkit-linear-gradient(160deg, #3a3f4a, #1c1f26);
    background: linear-gradient(160deg, #3a3f4a, #1c1f26);
    color: rgba(255, 255, 255, 0.85);
}
.cover-fallback-icon {
    font-size: 52px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1;
}
.cover-fallback-text {
    font-size: 15px;
    max-width: 80%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.music-info {
    text-align: center;
}
.music-title {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 1px;
}
.music-artist {
    margin-top: 4px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
}

/* ===== 中部:滚动歌词 ===== */
.lyric-wrap {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    min-height: 0;
    position: relative;
    margin: 14px 0;
    overflow: hidden;
}
.lyric {
    height: 100%;
    overflow: hidden;
    position: relative;
}
.lyric ul {
    position: relative;
    padding: 50% 0;
    box-sizing: border-box;
    will-change: transform;
}
.lyric ul li {
    text-align: center;
    padding: 9px 14px;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.45);
    -webkit-transition: all 0.45s ease;
    transition: all 0.45s ease;
    white-space: normal;
    word-break: break-all;
    -webkit-transform-origin: center;
    transform-origin: center;
}
.lyric ul li.lplaying {
    color: #31c27c;
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 0 12px rgba(49, 194, 124, 0.4);
    -webkit-transform: scale(1.12);
    transform: scale(1.12);
}
.lyric-tip {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* ===== 底部:控制栏 ===== */
.footer {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    padding: 6px 4px 0;
}

/* ===== 返回歌曲列表按钮（最后一首歌时显示，置于封面图上方） ===== */
.back-to-list-wrap {
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    text-align: center;
    margin: 4px 0 6px;
}
.back-to-list {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.back-to-list:active {
    background: rgba(255, 255, 255, 0.16);
}
.back-to-list:focus { outline: 0; }
.progress {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    margin-bottom: 14px;
}
.progress .time {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    min-width: 38px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.progress-box {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    height: 22px;
    margin: 0 10px;
    position: relative;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    cursor: pointer;
}
.progress-box::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
}
.progress-bar {
    position: absolute;
    left: 0;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 0;
    height: 3px;
    border-radius: 2px;
    background: #31c27c;
}
.progress-dot {
    position: absolute;
    left: 0;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #31c27c;
    box-shadow: 0 0 6px rgba(49, 194, 124, 0.6);
}

.con-btn {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 44px;
}
.btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
}
.btn.prev, .btn.next {
    width: 38px;
    height: 38px;
    opacity: 0.85;
}
.btn.prev::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-right: 11px solid #fff;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
}
.btn.prev::after {
    content: '';
    position: absolute;
    right: 7px;
    top: 50%;
    width: 3px;
    height: 14px;
    background: #fff;
    border-radius: 2px;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
}
.btn.next::before {
    content: '';
    position: absolute;
    right: 6px;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid #fff;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
}
.btn.next::after {
    content: '';
    position: absolute;
    left: 7px;
    top: 50%;
    width: 3px;
    height: 14px;
    background: #fff;
    border-radius: 2px;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
}

/* 播放/暂停:纯CSS空心圆 + 三角/双竖线 */
.btn.play {
    width: 58px;
    height: 58px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    -webkit-transition: all 0.25s ease;
    transition: all 0.25s ease;
}
.btn.play.playing::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #fff;
    -webkit-transform: translate(-25%, -50%);
    transform: translate(-25%, -50%);
}
.btn.play.paused::before,
.btn.play.paused::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 5px;
    height: 20px;
    border-radius: 2px;
    background: #fff;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
}
.btn.play.paused::before { left: 50%; margin-left: -9px; }
.btn.play.paused::after { left: 50%; margin-left: 4px; }

/* ===== 歌单页（主域名直接访问时） ===== */
.playlist {
    position: relative;
    z-index: 2;
    height: 100%;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 24px) 20px calc(env(safe-area-inset-bottom, 0px) + 24px) 20px;
    box-sizing: border-box;
    color: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.playlist-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 3px;
    text-align: center;
    margin-bottom: 20px;
}
.song-list {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-flex-direction: column;
    flex-direction: column;
    gap: 14px;
}
.song-item {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.song-item:active { background: rgba(255, 255, 255, 0.14); }
.song-cover {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    -webkit-flex-shrink: 0;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
}
.song-meta { min-width: 0; }
.song-title {
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.song-artist {
    margin-top: 3px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== 加载层（单曲页进入时） ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.92);
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.loading-box {
    width: 78%;
    max-width: 320px;
    text-align: center;
}
.loading-text {
    font-size: 17px;
    letter-spacing: 3px;
    color: #fff;
    margin-bottom: 18px;
}
.loading-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.loading-bar {
    height: 100%;
    width: 0%;
    background: #31c27c;
    border-radius: 3px;
    -webkit-transition: width 0.2s ease;
    transition: width 0.2s ease;
}
/* 无法得知总大小时，进度条以滑带动画表示加载中 */
.loading-track.indeterminate .loading-bar {
    width: 34%;
    -webkit-transition: none;
    transition: none;
    -webkit-animation: loading-slide 1.1s infinite;
    animation: loading-slide 1.1s infinite;
}
@-webkit-keyframes loading-slide {
    0% { -webkit-transform: translateX(-150%); }
    100% { -webkit-transform: translateX(400%); }
}
@keyframes loading-slide {
    0% { transform: translateX(-150%); }
    100% { transform: translateX(400%); }
}
.loading-percent {
    margin-top: 10px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    font-variant-numeric: tabular-nums;
}
