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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.player {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.song-info {
    text-align: center;
    margin-bottom: 30px;
}

.song-info h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.song-info p {
    color: #666;
    font-size: 14px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.progress-container span {
    font-size: 12px;
    color: #666;
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

#progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.controls button {
    width: 60px;
    height: 60px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.controls button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

#play {
    width: 70px;
    height: 70px;
    font-size: 28px;
}

#mode {
    width: 50px;
    height: 50px;
    font-size: 20px;
    opacity: 0.8;
}

#mode:hover {
    opacity: 1;
}

.playlist {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

.playlist h2 {
    font-size: 16px;
    color: #333;
    margin-bottom: 15px;
}

#song-list {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
}

#song-list li {
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: background 0.2s;
}

#song-list li:hover {
    background: #f5f5f5;
}

#song-list li.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

#song-list::-webkit-scrollbar {
    width: 6px;
}

#song-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

/* 移动端适配 */
@media (max-width: 600px) {
    body {
        padding: 0;
        align-items: flex-start;
    }

    .player {
        max-width: 100%;
        border-radius: 0;
        padding: 20px;
        min-height: 100vh;
        box-shadow: none;
    }

    .song-info h1 {
        font-size: 20px;
    }

    .progress-container {
        gap: 10px;
        margin-bottom: 20px;
    }

    .progress-container span {
        font-size: 11px;
        min-width: 35px;
    }

    .progress-bar {
        height: 8px;
    }

    .controls {
        gap: 15px;
        margin-bottom: 20px;
    }

    .controls button {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    #play {
        width: 65px;
        height: 65px;
        font-size: 26px;
    }

    #mode {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .playlist h2 {
        font-size: 14px;
    }

    #song-list {
        max-height: 300px;
    }

    #song-list li {
        padding: 12px 15px;
        font-size: 14px;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .controls button:hover {
        transform: none;
        box-shadow: none;
    }

    .controls button:active {
        transform: scale(0.95);
    }

    #song-list li:hover {
        background: transparent;
    }

    #song-list li:active {
        background: #f5f5f5;
    }
}
