.custom-mp3-player {
    width: 100%;
    margin: 20px 0;
    padding: 15px;
    background: #ffffff;
    border-radius: 8px;
    color: #000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid #999;
}

.player-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.player-controls button {
    padding: 8px 15px;
    border: 1px solid #000;
    border-radius: 4px;
    background: #000;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: normal;
}

.player-controls .play-pause {
    min-width: 104px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.player-controls .play-pause.is-waiting {
    cursor: progress;
}

.player-controls .play-pause.is-waiting::before {
    content: "";
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cmp-player-spin 0.7s linear infinite;
}

.player-controls button:hover {
    background: #333;
    border-color: #333;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress {
    width: 0;
    height: 100%;
    background: #000;
    border-radius: 3px;
}

.custom-mp3-player.is-buffering .progress-bar::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 -35%;
    width: 35%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.3), transparent);
    animation: cmp-player-buffer 1s ease-in-out infinite;
}

@keyframes cmp-player-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes cmp-player-buffer {
    to {
        left: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .player-controls .play-pause.is-waiting::before,
    .custom-mp3-player.is-buffering .progress-bar::after {
        animation: none;
    }
}

.time {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 12px;
    color: #333;
}

/* 登录弹窗样式 */
.login-popup {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.login-popup.show {
    display: flex;
}

.login-popup-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    border: 1px solid #999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #000;
}

.login-popup h3 {
    margin-top: 0;
    color: #000;
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: bold;
}

.login-popup p {
    color: #333;
    margin-bottom: 20px;
    line-height: 1.5;
}

.login-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.login-button, .register-button {
    padding: 10px 25px;
    border: 1px solid #000;
    border-radius: 4px;
    background: #000;
    color: white !important;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 80px;
}

.register-button {
    background: #fff;
    color: #000 !important;
}

.login-button:hover {
    background: #333;
}

.register-button:hover {
    background: #f0f0f0;
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #000;
}

.close-popup:hover {
    color: #555;
}

.custom-mp3-player {
    position: relative;
}

.custom-mp3-player [hidden] {
    display: none !important;
}
