/* --- 基础布局重置 --- */
body {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
    background-color: #000;
}

html, body {
    height: 100%;
    background-size: cover;
    background-position: center;
    backdrop-filter: blur(50px);
    overflow: hidden; /* 禁止主页面滚动 */
}

/* 遮罩层 - 全屏半透明黑 */
.notice-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px); /* 背景模糊，提升高级感 */
}

/* 弹窗主体卡片 */
.notice-card {
    background: #121417;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

/* 顶部蓝色图标 */
.notice-icon {
    width: 70px;
    height: 50px;
    background: #00a2ff;
    border-radius: 10px;
    margin: -60px auto 20px auto; /* 向上偏移产生悬浮感 */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 20px rgba(0,162,255,0.3);
}

.icon-inner {
    color: white;
    font-size: 30px;
    font-weight: bold;
}

.notice-title {
    color: white;
    font-size: 24px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.notice-content {
    color: #a0a0a0;
    font-size: 14px;
    line-height: 1.8;
}

.notice-highlight {
    color: #ff9800; /* 橙色强调 */
    margin: 20px 0;
    font-weight: bold;
}

.notice-links {
    margin-bottom: 25px;
}

.notice-links a {
    color: #4a90e2;
    text-decoration: none;
    margin: 0 5px;
    font-size: 13px;
}

/* 红色确认按钮 */
.notice-btn {
    width: 100%;
    padding: 12px;
    background: #50d0f0; /* 类Netflix红 */
    border: none;
    border-radius: 25px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.notice-btn:hover {
    background: #24c0e7;
    transform: scale(1.02);
}

/* --- 顶部展示区 --- */
.upper-container {
    width: 80%;
    padding-left: 10%;
    height: 80%;
    position: relative;
    z-index: 1;
}

.record-container, .introduction-container {
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    float: left;
}

.record-bg {
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#record-img {
    background-size: cover;
    background-position: center;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 5px solid #111;
}

.text-container { width: 80%; padding-left: 10%; }
#music-title { color: white; font-size: 3.2rem; line-height: 4rem; margin-bottom: 10px; }
.author-container { color: rgba(255,255,255,0.8); font-size: 1.4rem; }

/* --- 底部控制栏 --- */
.audio-box {
    width: 100%;
    height: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    bottom: 0;
    z-index: 5; 
}
.audio-container { width: 90%; }

.pgs-total {
    height: 6px !important;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    position: relative;
    /* overflow: hidden; */
}
#progress {
    height: 100%;
    background-color: #42b680;
    width: 0%;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 3px;
}

/* 进度条上的小白点 (滑块) */
#progress::after {
    content: "";
    position: absolute;
    right: -7px; /* 居中于进度末端 */
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    cursor: grab;
    transition: scale 0.2s;
}

#progress:active::after {
    scale: 1.2;
    cursor: grabbing;
}


/* --- 修复音量图标展示 --- */
.volume {
    width: 25px !important;
    height: 25px !important;
    margin: 0 10px 0 15px !important;
    cursor: pointer;
    /* 使用内联图标保底，确保一定能看到 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z'/%3E%3C/svg%3E") !important;
    background-size: 100% 100%;
}

/* --- 音量条：外观同步进度条并支持绿色进度 --- */
#volumn-togger {
    width: 80px;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    margin-left: 10px;
    /* 核心：使用渐变背景实现绿色进度 */
    background: linear-gradient(to right, #42b680 70%, rgba(255, 255, 255, 0.15) 70%);
}

/* 音量条小白点 (Chrome/Safari/Edge) */
#volumn-togger::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    cursor: pointer;
    border: none;
}

/* 音量条小白点 (Firefox) */
#volumn-togger::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    cursor: pointer;
    border: none;
}
/* 按钮与时间容器布局 */
.a-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 15px;
}

/* 播放时长：设为白色 */
.time-container { 
    width: 20%; 
    color: #ffffff; /* 变白色 */
    font-size: 14px;
}

/* 中间控制区域：居中对齐 */
.center-button-container { 
    width: 60%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 5px;
}

.center-icon { width: 30px; height: 30px; margin: 0 15px; cursor: pointer; background-size: 100% 100%; }
/* 使用order属性调整顺序 */

.s-right { 
    background-image: url("../img/上一首.png");
    order: 1; /* 第二位置 */
}
.icon-play { 
    background-image: url("../img/继续播放.png"); 
    width: 50px; 
    height: 50px; 
    background-size: 100% 100%; 
    cursor: pointer; 
    margin: 0 15px;
    order: 2; /* 第三位置，正中间 */
}
.icon-pause { 
    background-image: url("../img/暂停.png"); 
    width: 45px; 
    height: 45px; 
    background-size: 100% 100%; 
    cursor: pointer; 
    margin: 0 15px;
    order: 2; /* 同样第三位置 */
}


.s-left { 
    background-image: url("../img/下一首.png");
    order: 3; /* 第四位置 */
}

.center-icon.volume {
    background-image: url("../img/音量.png");
    order: 5; /* 第五位置 */
}


/* 后部按钮区域 */
.bottom-button-container { 
    width: 20%; 
    display: flex; 
    align-items: center; 
    justify-content: flex-end; 
    gap: 10px; /* 添加间距 */
}
.mode { 
    background-image: url("../img/mode1.png");
    order: -1; /* 第一位置 */
}
.center-icon.volume {
    order: 0; /* 音量图标在滑块左边 */
}
/* 调整后部按钮的顺序 */
#volumn-togger {
    order: 1; /* 音量滑块在倍速左边 */
}

.bottom-icon { width: 22px; height: 22px; cursor: pointer; background-size: 100% 100%; margin-left: 15px; }

.speed { 
    order: 2; /* 倍速在音量滑块右边 */
    color: white; 
    cursor: pointer; 
    font-size: 13px; 
    border: 1px solid white; 
    padding: 2px 5px; 
    border-radius: 4px; 
    margin: 0;
}

.list { 
    order: 3; /* 列表在倍速右边 */
    background-image: url("../img/列表.png"); 
    width: 22px; 
    height: 22px; 
    cursor: pointer; 
    background-size: 100% 100%; 
    margin-left: 15px; 
}

/* --- 侧边音乐列表 --- */
.music-list {
    display: none;
    position: fixed !important;
    height: 100vh !important;
    right: 0;
    top: 0;
    width: 320px;
    background-color: rgba(18, 22, 20, 0.98); 
    backdrop-filter: blur(30px);
    z-index: 1000000 !important;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.8);
    overflow: hidden;
}

.music-list-title {
    color: #fff;
    font-size: 1.8rem;
    padding: 40px 25px 15px 25px;
    font-weight: bold;
    flex-shrink: 0;
    text-align: left;
}

.all-list {
    flex: 1;
    overflow-y: auto !important; 
    overflow-x: hidden;
    padding: 10px 0 100px 0;
    display: block !important;
    width: 100% !important;
}

.list-item {
    display: block !important;
    width: 100% !important;
    padding: 15px 25px !important;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    cursor: pointer;
    font-size: 15px;
    text-align: left !important;
    box-sizing: border-box !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s;
}

.list-item:hover {
    background: rgba(255,255,255,0.05);
    color: #42b680;
}

/* 滚动条 */
.all-list::-webkit-scrollbar { width: 5px; }
.all-list::-webkit-scrollbar-thumb { background: #42b680; border-radius: 10px; }

.close-list {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 320px);
    height: 100%;
    z-index: 999999;
    background: rgba(0,0,0,0.2);
}

/* --- 动画 --- */
.rotate-play { animation: rotateAni 15s infinite linear; }
@keyframes rotateAni { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.list-card-show { animation: showAni 0.4s ease-out forwards; }
@keyframes showAni { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* 备案信息样式 */
.icp-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 15px 0;
    background: rgba(0, 0, 0, 0.3);
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.icp-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icp-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

.icp-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.icp-link:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

/* 为了确保备案信息不遮挡内容，给页面主体添加底部内边距 */
body {
    padding-bottom: 60px; /* 这个值应该大于或等于备案容器的高度 */
}
@media screen and (max-width: 768px) {
    /* 1. 修复唱片变形问题 */
    .record-bg {
        width: 65vw !important; /* 使用视口单位确保是正圆 */
        height: 65vw !important;
        max-width: 280px;
        max-height: 280px;
    }
    
    #record-img {
        width: 70% !important;
        height: 70% !important;
    }

    /* 2. 重新定义控制栏：手机端由于空间极小，必须精简 */
    .a-controls {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 95% !important;
        margin: 0 auto;
        padding-top: 10px;
    }

    /* 隐藏手机端不需要或太占空间的元素 */
    .time-container, 
    #volumn-togger, 
    .center-icon.volume { 
        display: none !important; 
    }

    /* 3. 中间按钮区域（上一首、播放、下一首） */
    .center-button-container {
        width: 60% !important;
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important;
        order: 2; /* 居中 */
    }

    /* 4. 左侧区域：放置模式按钮 */
    .mode {
        width: 24px !important;
        height: 24px !important;
        order: 1 !important;
        margin: 0 !important;
    }

    /* 5. 右侧区域：放置倍速和列表 */
    .bottom-button-container {
        width: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        order: 3 !important;
    }

    .speed {
        font-size: 12px !important;
        padding: 2px 4px !important;
        white-space: nowrap;
    }

    .list {
        width: 22px !important;
        height: 22px !important;
        margin: 0 !important;
    }

    /* 6. 备案信息：防止遮挡控制栏 */
    .icp-container {
        position: relative !important;
        background: transparent !important;
        padding-bottom: 20px !important;
    }
}

@media screen and (max-width: 768px) {
    /* 1. 修复唱片变形问题 */
    .record-bg {
        width: 65vw !important; /* 使用视口单位确保是正圆 */
        height: 65vw !important;
        max-width: 280px;
        max-height: 280px;
    }
    
    #record-img {
        width: 70% !important;
        height: 70% !important;
    }

    /* 2. 重新定义控制栏：手机端由于空间极小，必须精简 */
    .a-controls {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 95% !important;
        margin: 0 auto;
        padding-top: 10px;
    }

    /* 隐藏手机端不需要或太占空间的元素 */
    .time-container, 
    #volumn-togger, 
    .center-icon.volume { 
        display: none !important; 
    }

    /* 3. 中间按钮区域（上一首、播放、下一首） */
    .center-button-container {
        width: 60% !important;
        display: flex !important;
        justify-content: center !important;
        gap: 10px !important;
        order: 2; /* 居中 */
    }

    /* 4. 左侧区域：放置模式按钮 */
    .mode {
        width: 24px !important;
        height: 24px !important;
        order: 1 !important;
        margin: 0 !important;
    }

    /* 5. 右侧区域：放置倍速和列表 */
    .bottom-button-container {
        width: auto !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        order: 3 !important;
    }

    .speed {
        font-size: 12px !important;
        padding: 2px 4px !important;
        white-space: nowrap;
    }

    .list {
        width: 22px !important;
        height: 22px !important;
        margin: 0 !important;
    }

    /* 6. 备案信息：防止遮挡控制栏 */
    .icp-container {
        position: relative !important;
        background: transparent !important;
        padding-bottom: 20px !important;
    }
}

@media screen and (max-width: 768px) {
    /* 1. 强制垂直堆叠布局 */
    .upper-container {
        width: 100% !important;
        height: 60% !important; /* 调整上半部分高度 */
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .record-container, .introduction-container {
        width: 100% !important;
        height: auto !important;
        float: none !important;
        display: flex !important;
        justify-content: center !important;
    }

    /* 2. 修复唱片变形 (关键：宽高必须相等) */
    .record-bg {
        width: 240px !important;
        height: 240px !important;
        flex-shrink: 0 !important; /* 防止被压缩 */
        margin-bottom: 20px;
    }

    #record-img {
        width: 160px !important;
        height: 160px !important;
        border-radius: 50% !important;
    }

    /* 3. 文字居中优化 */
    .text-container {
        width: 90% !important;
        padding: 0 !important;
        text-align: center !important;
    }

    #music-title {
        font-size: 1.6rem !important;
        line-height: 2rem !important;
        margin-bottom: 5px !important;
    }

    .author-container {
        font-size: 0.9rem !important;
    }

    /* 4. 底部控制区域优化 */
    .audio-box {
        height: 30% !important;
        bottom: 20px !important; /* 向上提一点，避开手机虚拟按键 */
    }

    .audio-container {
        width: 90% !important;
    }

    /* 隐藏占位置的元素 */
    .time-container, #volumn-togger, .center-icon.volume {
        display: none !important;
    }

    /* 5. 重新排列控制按钮，防止挤压 */
    .a-controls {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: 10px !important;
    }

    /* 中间：上一首、播放、下一首 */
    .center-button-container {
        width: 55% !important;
        gap: 10px !important;
        justify-content: center !important;
        order: 2 !important;
    }

    /* 左侧：播放模式 */
    .mode {
        width: 25px !important;
        height: 25px !important;
        order: 1 !important;
        margin: 0 !important;
    }

    /* 右侧：倍速和列表 */
    .bottom-button-container {
        width: auto !important;
        gap: 15px !important;
        order: 3 !important;
        display: flex !important;
        align-items: center !important;
    }

    .speed {
        font-size: 11px !important;
        border: 1px solid rgba(255,255,255,0.5) !important;
    }

    .list {
        margin: 0 !important;
    }

    /* 6. 备案信息改为相对定位，不遮挡控制条 */
    .icp-container {
        position: fixed !important;
        bottom: 0 !important;
        height: auto !important;
        padding: 5px 0 !important;
        background: rgba(0,0,0,0.5) !important;
    }

    .icp-content {
        flex-direction: column !important;
        font-size: 10px !important;
        gap: 0px !important;
    }
}
@media screen and (max-width: 768px) {
    /* 1. 核心布局：利用 Flex 自动分配空间 */
    .upper-container {
        width: 100% !important;
        height: 70% !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        position: absolute !important;
        top: 45% !important;
        transform: translateY(-50%) !important;
    }

    /* 2. 唱片容器：使用 vw (视口宽度) 确保在任何屏幕都是正圆 */
    .record-bg {
        width: 65vw !important;  /* 宽度随屏幕变化 */
        height: 65vw !important; /* 高度强制等于宽度 */
        max-width: 240px !important; /* 给大屏手机设上限 */
        max-height: 240px !important;
        min-width: 180px !important; /* 给小屏手机设下限 */
        min-height: 180px !important;
        margin-bottom: 20px !important;
        flex-shrink: 0 !important;
        border-radius: 50% !important;
        aspect-ratio: 1 / 1 !important; /* 现代浏览器强制比例 */
    }

    #record-img {
        width: 70% !important;
        height: 70% !important;
        border-radius: 50% !important;
    }

    /* 3. 文字区域 */
    .text-container {
        width: 90% !important;
        text-align: center !important;
    }

    #music-title {
        font-size: 1.5rem !important; /* 稍微缩小字号防止长歌名溢出 */
        margin-bottom: 5px !important;
    }

    /* 4. 底部控制栏强力补丁 */
    .audio-box {
        height: 20% !important;
        bottom: 30px !important;
    }

    .a-controls {
        width: 95% !important;
        margin: 0 auto !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }

    /* 彻底清理占位的空容器 */
    .time-container, #volumn-togger, .center-icon.volume {
        display: none !important;
    }

    /* 中间按钮组 */
    .center-button-container {
        width: 50% !important;
        gap: 5px !important;
        order: 2 !important;
    }

    .icon-play, .icon-pause {
        width: 40px !important;
        height: 40px !important;
    }

    /* 左侧模式 */
    .mode {
        width: 20px !important;
        height: 20px !important;
        order: 1 !important;
    }

    /* 右侧功能组 */
    .bottom-button-container {
        width: 28% !important;
        gap: 8px !important;
        order: 3 !important;
    }

    .speed {
        font-size: 10px !important;
        padding: 1px 3px !important;
    }

    .list {
        width: 20px !important;
        height: 20px !important;
    }
}

@media screen and (max-width: 768px) {
    /* 1. 核心容器：保持内容垂直居中 */
    .upper-container {
        width: 100% !important;
        height: 65% !important; /* 给下方双行按钮留出空间 */
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        position: absolute !important;
        top: 40% !important; /* 整体视线稍微上移 */
        transform: translateY(-50%) !important;
    }

    /* 唱片防变形：保持正圆 */
    .record-bg {
        width: 62vw !important; 
        height: 62vw !important;
        max-width: 230px !important;
        margin-bottom: 20px !important;
        flex-shrink: 0 !important;
        border-radius: 50% !important;
        aspect-ratio: 1 / 1 !important;
    }

    #record-img {
        width: 70% !important;
        height: 70% !important;
        border-radius: 50% !important;
    }

    /* 2. 底部盒子：高度自适应双行内容 */
    .audio-box {
        height: auto !important;
        bottom: 25px !important;
        padding-bottom: 35px !important; /* 为备案信息留位 */
    }

    .audio-container {
        width: 92% !important;
    }

    /* 3. 核心修改：控制栏改为两行排列 */
    .a-controls {
        display: flex !important;
        flex-direction: column !important; /* 强制分行 */
        gap: 15px !important; /* 行间距 */
        width: 100% !important;
        margin-top: 15px !important;
    }

    /* --- 第一行：切歌控制组 --- */
    .center-button-container {
        width: 100% !important; 
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 25px !important; /* 按钮间距 */
        order: 1 !important;
    }

    .icon-play, .icon-pause {
        width: 58px !important; /* 分行后空间充裕，放大播放键 */
        height: 58px !important;
        flex-shrink: 0 !important; /* 绝对禁止压缩 */
        background-size: contain !important;
    }

    .s-right, .s-left {
        width: 32px !important;
        height: 32px !important;
        flex-shrink: 0 !important;
    }

    /* --- 第二行：模式、倍速、列表组 --- */
    .bottom-button-container {
        width: 100% !important;
        display: flex !important;
        justify-content: space-around !important; /* 按钮横向均匀分布 */
        align-items: center !important;
        order: 2 !important;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.1); /* 增加视觉分割感 */
    }

    /* 隐藏不需要的元素 */
    .time-container, #volumn-togger, .center-icon.volume, .volume { 
        display: none !important; 
    }

    /* 统一第二行图标尺寸 */
    .mode, .list {
        width: 24px !important;
        height: 24px !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    .speed {
        font-size: 13px !important;
        padding: 2px 6px !important;
        border-radius: 4px !important;
        margin: 0 !important;
    }

    /* 4. 备案信息 */
    .icp-container {
        position: fixed !important;
        bottom: 0 !important;
        padding: 4px 0 !important;
        background: rgba(0,0,0,0.5) !important;
    }
}

/* --- 极窄屏专项特调 (iPhone 5/SE/4) --- */
@media screen and (max-width: 320px) {
    .record-bg {
        width: 180px !important;
        height: 180px !important;
    }
    
    .icon-play, .icon-pause {
        width: 50px !important;
        height: 50px !important;
    }

    .a-controls {
        gap: 10px !important;
    }

    .bottom-button-container {
        padding-top: 8px;
    }
}