/* 音乐播放器容器 */
.card-music {
    padding: 50px 50px;
    /* 隐藏整个音乐卡片区域的滚动条 */
    overflow: hidden !important;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE and Edge */
}

.card-music::-webkit-scrollbar {
    display: none !important; /* Chrome, Safari, Opera */
}

.card-music .title {
    font-size: 25px;
    font-weight: 500;
    color: #222;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e5;
    margin-top: 0px;
}

.music-player {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    backdrop-filter: blur(10px);
    /* 确保播放器本身没有滚动条 */
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.music-player::-webkit-scrollbar {
    display: none !important;
}

.player-main {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .player-main {
        flex-direction: column;
    }
}

/* 专辑封面区域 */
.album-section {
    flex: 0 0 250px;
    padding: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(30, 202, 228, 0.1) 0%, rgba(24, 169, 196, 0.1) 100%);
    border-right: 1px solid rgba(30, 202, 228, 0.2);
}

@media (max-width: 768px) {
    .album-section {
        flex: none;
        border-right: none;
        border-bottom: 1px solid rgba(30, 202, 228, 0.2);
    }
}

/* 控制区域 */
.control-section {
    flex: 1;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
}

@media (max-width: 768px) {
    .control-section {
        padding: 20px;
    }
}

/* 专辑封面 */
.album-cover {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.play-pause-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(30, 202, 228, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.play-pause-btn:hover {
    background: rgba(30, 202, 228, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

/* 曲目信息 */
.track-info {
    text-align: center;
    margin-bottom: 20px;
}

.track-title {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.track-artist {
    font-size: 1.6rem;
    color: #666;
}

/* 进度条区域 */
.progress-section {
    margin: 15px 0 20px 0;
}

.progress-container {
    background: #dddddd;
    height: 6px;
    border-radius: 3px;
    margin-bottom: 8px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    background: #1ecae4;
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.1s;
}

.progress-fill {
    background: #1ecae4;
    height: 100%;
    width: 0%;
    border-radius: 3px;
    transition: width 0.1s;
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: #666;
    font-size: 1rem;
}

/* 控制按钮和音量容器 */
.controls-volume-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

@media (max-width: 768px) {
    .controls-volume-section {
        flex-direction: column;
        gap: 20px;
    }
}

/* 控制按钮 */
.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.control-btn {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 1.1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.control-btn:hover {
    background: rgba(30, 202, 228, 0.1);
    color: #1ecae4;
    transform: scale(1.1);
}

.control-btn:first-child,
.control-btn:last-child {
    font-size: 1.5rem;
    width: 38px;
    height: 38px;
}

.control-btn.play-btn {
    background: #1ecae4;
    color: white;
    width: 48px;
    height: 48px;
    font-size: 2rem;
}

.control-btn.play-btn:hover {
    background: #18a9c4;
    color: white;
    transform: scale(1.1);
}

/* 音量控制 */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 100px;
}

.volume-control i {
    color: #666;
    font-size: 1.5rem;
}

#volumeValue {
    font-size: 1rem;
    color: #666;
}

.volume-control input[type="range"] {
    flex: 1;
    height: 4px;
    background: #dddddd;
    border-radius: 2px;
    outline: none;
    -webkit-appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    background: #666;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(102, 102, 102, 0.3);
}

.volume-control input[type="range"]::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background: #666;
    cursor: pointer;
    border-radius: 50%;
    border: none;
    box-shadow: 0 1px 2px rgba(102, 102, 102, 0.3);
}

.volume-value {
    color: #666;
    font-size: 0.85rem;
    min-width: 40px;
    text-align: right;
}

/* 播放列表 */
.playlist {
    background: #f8f9fa;
    padding: 25px;
}

.playlist h5 {
    color: #333;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlist-items {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
    /* 确保播放列表滚动条可见 */
    scrollbar-width: thin !important;
    -ms-overflow-style: scrollbar !important;
}

.playlist-items::-webkit-scrollbar {
    width: 6px !important;
    display: block !important;
}

.playlist-items::-webkit-scrollbar-track {
    background: #eee;
    border-radius: 3px;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: #1ecae4;
    border-radius: 3px;
}

.playlist-items::-webkit-scrollbar-thumb:hover {
    background: #18a9c4;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    background: white;
}

.playlist-item:hover {
    background: rgba(30, 202, 228, 0.1);
    transform: translateX(5px);
}

.playlist-item.playing {
    background: rgba(30, 202, 228, 0.15);
    border-left-color: #1ecae4;
    box-shadow: 0 2px 8px rgba(30, 202, 228, 0.2);
}

.item-info {
    flex: 1;
    margin-left: 15px;
}

.item-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 3px;
    display: block;
}

.item-artist {
    font-size: 1.2rem;
    color: #666;
    display: block;
}

.item-duration {
    color: #888;
    font-size: 1rem;
    margin-left: 15px;
}

/* 唱片旋转动画（可选） */
@keyframes disc-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.album-cover img.playing {
    animation: disc-rotate 20s linear infinite;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .album-cover {
        width: 150px;
        height: 150px;
    }
    
    .track-title {
        font-size: 1.6rem;
    }
    
    .player-controls {
        gap: 15px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .control-btn:nth-child(2) {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .playlist {
        padding: 20px;
    }
    
    .card-music {
        padding: 30px 20px;
    }
}