/* ============================================
   音乐播放器样式 - Music Player Styles
   文件名: player.css
   版本: 2.0
   说明: 包含播放器基础样式和5种炫酷特效
   ============================================ */

/* ----- 全局样式设置 ----- */
* {
    margin: 0;
    padding: 0;
}

button {
    margin: 0;
    padding: 0;
    border: 0px solid transparent;
    color: transparent;
    outline: none;
    height: 50px;
}

html, body {
    background: #d2d5d6;
    height: 100%;
    font-family: "PingFang SC",微软雅黑, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ----- 播放器主容器 ----- */
#wrapper {
    width: 90%;
    max-width: 1024px;
    background: #eef1f2;
    position: relative;
    margin-top: 10px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 0px 7px #999;
    text-align: center;
}

/* ----- 下载区域 ----- */
#download {
    width: 90%;
    max-width: 1024px;
    margin-top: 20px;
    background: #eef1f2;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 0px 7px #999;
    text-align: center;
    padding-top: 15px;
    padding-bottom: 20px;
}

#download img {
    width: 60%;
    height: auto;
    margin-top: 10px;
    margin-bottom: 10px;
}

#download p {
    margin-left: 7%;
    margin-right: 7%;
    line-height: 1.8em;
    text-align: justify;
    text-justify: inter-character;
}

/* ----- 公告区域 ----- */
#notice {
    width: 90%;
    max-width: 1024px;
    margin-top: 20px;
    background: #eef1f2;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0px 0px 7px #999;
    text-align: center;
    padding-top: 15px;
    padding-bottom: 15px;
}

#notice img {
    width: 80%;
    height: auto;
    margin-top: 10px;
    margin-bottom: 10px;
}

#notice p {
    margin-left: 7%;
    margin-right: 7%;
    line-height: 1.8em;
    text-align: justify;
    text-justify: inter-character;
}

/* ----- 随机播放按钮 ----- */
#randomall {
    width: 90%;
    max-width: 1024px;
    margin-top: 10px;
    background: #f5f7f8;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: center;
    height: 48px;
    line-height: 48px;
    font-size: 14px;
    color: #4CAF50;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#randomall:hover {
    background: #4CAF50;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76,175,80,0.2);
}

#randomall:active {
    transform: translateY(0);
    box-shadow: 0px 0px 15px #888;
}

/* ----- 特效切换区域 ----- */
.effect-section {
    width: 90%;
    max-width: 1024px;
    margin: 15px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background: #f5f7f8;
    border-radius: 50px;
    padding: 8px 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.effect-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #4CAF50;
    font-weight: 500;
    letter-spacing: 1px;
}

.effect-label i {
    font-size: 14px;
}

.effect-buttons {
    display: flex;
    gap: 8px;
}

.effect-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    color: #666;
    border: 1px solid #e0e4e8;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.effect-btn i {
    font-size: 12px;
    transition: all 0.2s ease;
}

.effect-btn span {
    font-size: 12px;
    font-weight: 500;
}

.effect-btn:hover {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(76,175,80,0.2);
}

.effect-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
    box-shadow: 0 2px 8px rgba(76,175,80,0.3);
}

.effect-btn.active i {
    color: white;
}

/* ----- 封面基础样式 ----- */
#cover {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

#cover img {
    margin: 0;
    width: 200px;
    height: 200px;
    border-radius: 100px;
    object-fit: cover;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* ----- 特效1: 3D立体旋转 ----- */
#cover.effect-1.playing img {
    animation: cover-rotate-3d 6s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
}

/* ----- 特效2: 脉冲光晕 ----- */
#cover.effect-2.playing img {
    animation: cover-spin 4s linear infinite, cover-pulse 2s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.5);
}

#cover.effect-2.playing::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 220px;
    height: 220px;
    margin-left: -110px;
    margin-top: -110px;
    border-radius: 110px;
    background: radial-gradient(circle, rgba(76,175,80,0.5), transparent);
    animation: glow-pulse 2s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

/* ----- 特效3: 霓虹灯 ----- */
#cover.effect-3.playing img {
    animation: cover-spin 5s linear infinite;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
}

#cover.effect-3.playing::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 103px;
    background: linear-gradient(135deg, #4CAF50, #8BC34A, #CDDC39, #4CAF50);
    background-size: 300% 300%;
    animation: neon-border 2s ease infinite;
    filter: blur(5px);
    z-index: 1;
    pointer-events: none;
}

/* ----- 特效4: 粒子光晕 ----- */
#cover.effect-4.playing img {
    animation: cover-smooth-spin 6s linear infinite;
}

#cover.effect-4.playing::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 220px;
    height: 220px;
    margin-left: -110px;
    margin-top: -110px;
    border-radius: 110px;
    background: radial-gradient(circle, rgba(76,175,80,0.5), rgba(76,175,80,0.1), transparent);
    animation: aura-pulse 2s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

#cover.effect-4.playing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin-left: -100px;
    margin-top: -100px;
    border-radius: 100px;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.9) 1%, transparent 2%),
                radial-gradient(circle at 70% 40%, rgba(255,255,255,0.9) 1%, transparent 2%),
                radial-gradient(circle at 45% 80%, rgba(255,255,255,0.9) 1%, transparent 2%),
                radial-gradient(circle at 85% 70%, rgba(255,255,255,0.9) 1%, transparent 2%);
    background-size: 200px 200px;
    background-repeat: no-repeat;
    animation: particles-float 3s ease-in-out infinite;
    opacity: 0.7;
    z-index: 3;
    pointer-events: none;
}

/* ----- 特效5: 波浪能量环 ----- */
#cover.effect-5.playing img {
    animation: cover-slow-spin 8s linear infinite;
}

#cover.effect-5.playing::before,
#cover.effect-5.playing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    margin-left: -100px;
    margin-top: -100px;
    border-radius: 100px;
    z-index: 1;
    pointer-events: none;
}

#cover.effect-5.playing::before {
    border: 2px solid rgba(76, 175, 80, 0.8);
    animation: wave-ring 2s ease-out infinite;
}

#cover.effect-5.playing::after {
    border: 1px dashed rgba(76, 175, 80, 0.6);
    animation: wave-ring 2s ease-out infinite 0.4s;
}

/* ----- 动画定义 ----- */
@keyframes cover-rotate-3d {
    0% {
        transform: rotateY(0deg) rotateX(0deg) scale(1);
        filter: brightness(1);
    }
    25% {
        transform: rotateY(90deg) rotateX(8deg) scale(1.02);
        filter: brightness(1.05);
    }
    50% {
        transform: rotateY(180deg) rotateX(0deg) scale(1.03);
        filter: brightness(1.02);
    }
    75% {
        transform: rotateY(270deg) rotateX(-8deg) scale(1.02);
        filter: brightness(1.05);
    }
    100% {
        transform: rotateY(360deg) rotateX(0deg) scale(1);
        filter: brightness(1);
    }
}

@keyframes cover-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes cover-pulse {
    0%, 100% {
        transform: scale(1);
        filter: brightness(1);
    }
    50% {
        transform: scale(1.02);
        filter: brightness(1.05);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.9;
    }
}

@keyframes neon-border {
    0% {
        background-position: 0% 50%;
        opacity: 0.6;
    }
    50% {
        background-position: 100% 50%;
        opacity: 1;
    }
    100% {
        background-position: 0% 50%;
        opacity: 0.6;
    }
}

@keyframes cover-smooth-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes aura-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

@keyframes particles-float {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: rotate(180deg) scale(1.03);
        opacity: 1;
    }
}

@keyframes cover-slow-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes wave-ring {
    0% {
        transform: scale(0.9);
        opacity: 0.8;
        border-width: 2px;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.4;
        border-width: 1px;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
        border-width: 0;
    }
}

/* ----- 暂停状态 ----- */
#cover.paused img {
    animation-play-state: paused;
}

#cover.paused::before,
#cover.paused::after {
    animation-play-state: paused;
    opacity: 0;
}

/* ----- 歌曲信息 ----- */
#name {
    text-align: center;
    line-height: 50px;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 15px;
}

.divderline {
    height: 1px;
    background-color: #e0e4e8;
    width: 98%;
    margin-right: auto;
    margin-left: auto;
    border-radius: 1px;
}

/* ----- 播放控制按钮 ----- */
#control {
    margin-top: 0px;
    width: 90%;
    margin-right: auto;
    margin-left: auto;
    height: 80px;
    vertical-align: middle;
    display: flex;
    align-items: center;
    justify-content: center;
}

.controlbutton {
    width: 28%;
    float: left;
    color: #666;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.2s ease;
}

.controlbutton:hover {
    color: #4CAF50;
    transform: scale(1.05);
}

.controlbutton:active {
    transform: scale(0.95);
}

.controlbuttonmini {
    width: 7%;
    float: left;
    color: #666;
    vertical-align: middle;
    cursor: pointer;
    transition: all 0.2s ease;
}

.controlbuttonmini:hover {
    color: #4CAF50;
    transform: scale(1.05);
}

.controlbuttonmini:active {
    transform: scale(0.95);
}

/* ----- 提示文字 ----- */
.tips {
    height: 50px;
    text-align: center;
    line-height: 50px;
    font-size: 12px;
    color: #999999;
}

/* ----- 版权信息区域 - 修复滚动和样式协调 ----- */
#copyright {
    width: 90%;
    max-width: 1024px;
    margin: 20px auto 15px;
    background: linear-gradient(135deg, #f5f7f8 0%, #eef1f2 100%);
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: relative;
    border: 1px solid rgba(76,175,80,0.1);
}

/* 滚动容器 */
.copyright-scroll {
    white-space: nowrap;
    overflow: hidden;
    padding: 12px 0;
    font-size: 13px;
    font-weight: 500;
    color: #4CAF50;
    letter-spacing: 1px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.5);
}

/* CSS3滚动动画 */
.copyright-scroll {
    animation: scrollText 18s linear infinite;
    display: inline-block;
    padding-left: 100%;
}

/* 鼠标悬停暂停滚动 */
#copyright:hover .copyright-scroll {
    animation-play-state: paused;
    cursor: pointer;
}

/* 滚动动画 */
@keyframes scrollText {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* 装饰音符 - 左侧 */
#copyright::before {
    content: '♪';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    font-size: 16px;
    z-index: 2;
    background: linear-gradient(135deg, #f5f7f8 0%, #eef1f2 100%);
    padding-right: 10px;
    border-radius: 20px 0 0 20px;
    line-height: 1;
}

/* 装饰音符 - 右侧 */
#copyright::after {
    content: '♪';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #4CAF50;
    font-size: 16px;
    z-index: 2;
    background: linear-gradient(135deg, #f5f7f8 0%, #eef1f2 100%);
    padding-left: 10px;
    border-radius: 0 20px 20px 0;
    line-height: 1;
}

/* 内容区域左右留空，避免被装饰遮挡 */
.copyright-scroll {
    padding-left: 48px;
    padding-right: 48px;
}

/* 如果内容太短，居中显示不滚动 */
@media (max-width: 768px) {
    .copyright-scroll {
        animation-duration: 12s;
    }
    
    #copyright::before,
    #copyright::after {
        font-size: 14px;
    }
    
    .copyright-scroll {
        padding-left: 45px;
        padding-right: 45px;
    }
}

/* ----- 时间显示 ----- */
#time {
    width: 90%;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    color: #999;
    margin-left: auto;
    margin-right: auto;
}

#currenttime {
    float: left;
}

#totaltime {
    float: right;
}

/* ----- 进度条 ----- */
.basebar {
    display: block;
    border: none;
    width: 90%;
    height: 4px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    margin-bottom: 10px;
    border-radius: 2px;
    background-color: #e0e4e8;
    position: relative;
    cursor: pointer;
}

.basebar .progressbar {
    display: block;
    border: none;
    width: 1%;
    height: 4px;
    border-radius: 2px;
    background-color: #4CAF50;
    transition: width 0.1s linear;
}

/* ----- 列表样式 ----- */
ul {
    list-style-type: none;
}

a {
    color: #4CAF50;
    text-decoration: none;
}

a:hover {
    color: #388E3C;
}

/* ----- 手风琴菜单 ----- */
.accordion {
    width: 90%;
    max-width: 1024px;
    margin-top: 15px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.accordion .link {
    cursor: pointer;
    display: block;
    padding: 15px 15px 15px 42px;
    color: #4D4D4D;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    transition: all 0.3s ease;
    background: white;
}

.accordion li:last-child .link {
    border-bottom: none;
}

.accordion li i {
    position: absolute;
    top: 14px;
    left: 12px;
    font-size: 15px;
    color: #999;
    transition: all 0.3s ease;
    font-style: normal;
}

.accordion li i.fa-chevron-down {
    right: 12px;
    left: auto;
    font-size: 14px;
}

.accordion li.open .link {
    color: #4CAF50;
    background: #f9f9f9;
}

.accordion li.open i {
    color: #4CAF50;
}

.accordion li.open i.fa-chevron-down {
    transform: rotate(180deg);
}

.submenu {
    display: none;
    background: #fafafa;
    font-size: 14px;
}

.submenu li {
    border-bottom: 1px solid #f0f0f0;
}

.submenu li:last-child {
    border-bottom: none;
}

.submenu a {
    display: block;
    text-decoration: none;
    color: #666;
    padding: 12px;
    padding-left: 42px;
    transition: all 0.25s ease;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.submenu a:hover {
    background: #4CAF50;
    color: #FFF;
    padding-left: 50px;
}

/* ----- 响应式设计 ----- */
@media screen and (max-width: 768px) {
    #wrapper, #accordion, #randomall, .effect-section, #copyright {
        width: 95%;
    }
    
    .effect-section {
        padding: 8px 12px;
        gap: 12px;
        flex-wrap: wrap;
    }
    
    .effect-buttons {
        gap: 6px;
    }
    
    .effect-btn {
        padding: 5px 10px;
    }
    
    .effect-btn span {
        display: none;
    }
    
    .effect-btn i {
        font-size: 14px;
        margin: 0;
    }
    
    .effect-label span {
        font-size: 12px;
    }
    
    #cover, #cover img {
        width: 150px;
        height: 150px;
    }
    
    #cover img {
        border-radius: 75px;
    }
    
    #cover.effect-2.playing::before,
    #cover.effect-4.playing::before {
        width: 170px;
        height: 170px;
        margin-left: -85px;
        margin-top: -85px;
    }
    
    #name {
        font-size: 14px;
        line-height: 40px;
    }
    
    .controlbutton {
        width: 25%;
    }
    
    .controlbuttonmini {
        width: 10%;
    }
    
    .submenu a {
        font-size: 12px;
        padding: 10px 10px 10px 35px;
    }
    
    .submenu a:hover {
        padding-left: 40px;
    }
    
    .accordion .link {
        padding: 12px 12px 12px 35px;
        font-size: 13px;
    }
    
    .accordion li i {
        top: 12px;
        left: 10px;
        font-size: 13px;
    }
    
    /* 移动端版权滚动调整 */
    .copyright-scroll {
        animation-duration: 12s;
        font-size: 12px;
        padding: 10px 0;
    }
    
    #copyright::before,
    #copyright::after {
        font-size: 12px;
    }
}

/* ----- IE浏览器降级 ----- */
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
    #cover.playing img {
        animation: none;
    }
    
    #cover.effect-2.playing::before,
    #cover.effect-3.playing::before,
    #cover.effect-4.playing::before,
    #cover.effect-4.playing::after,
    #cover.effect-5.playing::before,
    #cover.effect-5.playing::after {
        display: none;
    }
    
    .copyright-scroll {
        animation: none;
        white-space: normal;
        text-align: center;
        padding-left: 48px;
        padding-right: 48px;
    }
}