* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
}

/* 折叠状态播放器样式 - 左下角 */
.player-collapsed {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(3px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 192, 203, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: float 3s ease-in-out infinite;
}

/* 音符图标平移动画 */
.player-collapsed i {
    font-size: 24px;
    color: #ffc0cb;
    transition: transform 0.3s ease;
    animation: iconFloat 2s ease-in-out infinite;
}

/* 整体浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* 图标自身浮动动画 */
@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-2px) scale(1.05);
    }
    75% {
        transform: translateY(2px) scale(0.95);
    }
}

.player-collapsed.rotating i {
    animation: rotate 2s linear infinite, iconFloat 2s ease-in-out infinite;
}

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

/* 展开状态播放器样式 - 水平居中 */
.music-player {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    display: none;
    flex-direction: column;
    align-items: center;
    z-index: 99;
    width: 80%;
    max-width: 600px;
    backdrop-filter: blur(3px);
    padding: 15px 20px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 192, 203, 0.3);
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
    transform-style: preserve-3d;
}

.music-player.active {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    pointer-events: all;
    display: flex;
}

.song-title {
    color: white;
    font-size: 1.2em;
    margin-bottom: 10px;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
}

.music-player.active .song-title {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease 0.2s;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.music-player.active .control-btn {
    opacity: 1;
    transform: translateY(0);
}

.music-player.active .play-pause-btn {
    transition: all 0.3s ease 0.3s;
}

.music-player.active .progress-container {
    transition: all 0.3s ease 0.4s;
}

.music-player.active .volume-btn {
    transition: all 0.3s ease 0.5s;
}

.music-player.active .playlist-btn {
    transition: all 0.3s ease 0.6s;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.progress-container {
    flex: 1;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.music-player.active .progress-container {
    opacity: 1;
    transform: translateY(25%);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: visible;
    margin-bottom: 5px;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

.progress-bar.dragging {
    background: rgba(255, 255, 255, 0.5);
}

.progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, #3498db, rgb(20, 75, 179));
    border-radius: 3px;
    transition: width 0.1s linear;
    position: relative;
}

.progress-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 2;
    touch-action: none;
    transition: opacity 0.2s ease, transform 0.1s ease;
    opacity: 0;
}

@media (hover: hover) {
    .progress-bar:hover .progress-thumb {
        opacity: 1;
    }
}

.progress-bar.dragging .progress-thumb {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

@media (max-width: 768px) {
    .progress-thumb {
        opacity: 1;
        width: 18px;
        height: 18px;
    }
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
}

/* 播放列表样式 */
.playlist-modal {
    position: absolute;
    bottom: calc(58%);
    right: 0;
    background: rgba(25, 55, 109, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 10px 0;
    min-width: 150px;
    max-width: 300px;
    width: max-content;
    visibility: hidden;
    opacity: 0;
    z-index: 101;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.playlist-modal.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    color: #ff69b4;
    padding: 0 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 8px;
}

.playlist-header h3 {
    margin: 0;
    font-size: 1em;
    font-weight: bold;
}

.playlist {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

.playlist-item {
    padding: 8px 15px 8px 25px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: bold;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
    color: #87ceeb;
    background: rgba(135, 206, 235, 0.3);
}

.playlist-item.active::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: #3498db;
    border-radius: 2px;
}

.playlist::-webkit-scrollbar {
    width: 6px;
}

.playlist::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: 5px 0;
}

.playlist::-webkit-scrollbar-thumb {
    background: rgba(255, 105, 180, 0.7);
    border-radius: 3px;
}

.playlist::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 105, 180, 0.9);
}

/* 音量控制样式 */
.volume-control {
    position: absolute;
    bottom: calc(58%);
    right: 73px;
    background: rgba(25, 55, 109, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 15px;
    width: 40px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    z-index: 101;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: translateY(10px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.volume-control.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.volume-bar {
    width: 6px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    touch-action: none;
}

.volume-bar.dragging {
    background: rgba(255, 255, 255, 0.5);
}

.volume-progress {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, #3498db, rgb(20, 75, 179));
    border-radius: 3px;
    transition: height 0.1s linear;
}

.volume-thumb {
    position: absolute;
    bottom: 70%;
    left: 50%;
    transform: translate(-50%, 50%);
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    touch-action: none;
    transition: opacity 0.2s ease, transform 0.1s ease;
    opacity: 0;
}

@media (hover: hover) {
    .volume-bar:hover .volume-thumb {
        opacity: 1;
    }
}

.volume-bar.dragging .volume-thumb {
    opacity: 1;
    transform: translate(-50%, 50%) scale(1.2);
}

@media (max-width: 768px) {
    .volume-thumb {
        opacity: 1;
        width: 18px;
        height: 18px;
    }
}

/* 时间提示工具样式 */
.progress-time-tooltip {
    position: absolute;
    bottom: 25px;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 10;
    font-weight: bold;
}

.progress-time-tooltip.show {
    opacity: 1;
}

@media (max-width: 768px) {
    .progress-time-tooltip {
        bottom: 30px;
        font-size: 14px;
        padding: 6px 12px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .player-collapsed {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        animation: floatMobile 3s ease-in-out infinite;
    }
    
    @keyframes floatMobile {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-8px);
        }
    }
    
    .player-collapsed i {
        font-size: 20px;
    }
    
    .music-player {
        width: 85%;
        padding: 12px 15px;
        bottom: 20px;
    }
    
    .music-player.active {
        transform: translateX(-50%) scale(1);
    }
    
    .music-player.active .song-title {
        opacity: 1;
        transform: translateY(0);
        transition: all 0.4s ease 0.2s;
    }
    
    .music-player.active .control-btn {
        opacity: 1;
        transform: translateY(0);
    }
    
    .music-player.active .progress-container {
        opacity: 1;
        transform: translateY(20%);
    }
    
    .playlist-modal {
        max-width: 230px;
    }
    
    .playlist-item {
        padding: 10px 15px 10px 25px;
    }
    
    .volume-control {
        width: 40px;
        height: 130px;
        right: 63px;
    }
    
    .volume-bar {
        width: 5px;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
        font-size: 1.1em;
    }
}

/* 错误页面样式 */
.error-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    color: white;
    text-align: center;
}

.error-content h1 {
    font-size: 6rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.error-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.reload-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.reload-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* 音频加载提示样式 */
.audio-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 15px;
    padding: 20px;
    z-index: 1000;
    color: white;
    text-align: center;
    min-width: 200px;
}

.loading-content i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.loading-content span {
    display: block;
    margin-bottom: 15px;
    font-size: 1rem;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .error-content h1 {
        font-size: 4rem;
    }
    
    .error-content p {
        font-size: 1.2rem;
    }
    
    .audio-loading {
        min-width: 180px;
        padding: 15px;
    }
}