* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header h1 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 2em;
}

.header-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-box {
    display: flex;
    gap: 10px;
    flex: 1;
}

.upload-btn {
    padding: 12px 25px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    white-space: nowrap;
    transition: all 0.3s;
}

.upload-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

#searchInput {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #667eea;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

#searchInput:focus {
    border-color: #764ba2;
    box-shadow: 0 0 10px rgba(118, 75, 162, 0.2);
}

#searchBtn {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

#searchBtn:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.player-section,
.playlist-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.now-playing {
    text-align: center;
    margin-bottom: 30px;
}

.album-art {
    width: 250px;
    height: 250px;
    margin: 0 auto 20px;
    position: relative;
}

.vinyl-disc {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, #1a1a1a 30%, #333 31%, #1a1a1a 32%, #000 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

.vinyl-disc.spinning {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.vinyl-center {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

#currentTitle {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 8px;
}

#currentArtist {
    color: #666;
    font-size: 1.1em;
}

.player-controls {
    margin-top: 20px;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.progress-container span {
    color: #666;
    font-size: 14px;
    min-width: 45px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.1s;
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.control-buttons button {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-buttons button:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.play-pause {
    width: 55px !important;
    height: 55px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-size: 22px !important;
}

.play-pause:hover {
    transform: scale(1.1) !important;
}

.control-buttons button.active {
    background: #667eea;
    color: white;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.volume-control span {
    font-size: 20px;
}

#volumeSlider {
    width: 150px;
    cursor: pointer;
}

#volumeValue {
    min-width: 40px;
    color: #666;
    font-size: 14px;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.playlist-header h3 {
    color: #333;
    font-size: 1.3em;
}

#refreshBtn {
    padding: 8px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

#refreshBtn:hover {
    background: #764ba2;
}

.playlist {
    max-height: 500px;
    overflow-y: auto;
}

.playlist::-webkit-scrollbar {
    width: 8px;
}

.playlist::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.playlist::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.playlist::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

.song-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.song-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.song-item.playing {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-left: 4px solid #667eea;
}

.song-number {
    width: 30px;
    color: #999;
    font-weight: bold;
}

.song-details {
    flex: 1;
}

.song-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.song-artist {
    color: #666;
    font-size: 0.9em;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.1em;
}

.error {
    text-align: center;
    padding: 40px;
    color: #e74c3c;
}

/* 上传模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: #667eea;
    margin-bottom: 20px;
}

.password-section {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-section label {
    color: #333;
    font-weight: 600;
    white-space: nowrap;
}

#uploadPassword {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

#uploadPassword:focus {
    border-color: #764ba2;
    box-shadow: 0 0 10px rgba(118, 75, 162, 0.2);
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #333;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 50px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background: #f9f9f9;
}

.upload-area:hover {
    background: #f0f0f0;
    border-color: #764ba2;
}

.upload-area.drag-over {
    background: rgba(102, 126, 234, 0.1);
    border-color: #764ba2;
}

.upload-area p {
    color: #666;
    font-size: 18px;
    margin: 10px 0;
}

.upload-area .hint {
    font-size: 14px;
    color: #999;
}

#uploadProgress {
    margin-top: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #666;
}

.upload-progress-bar {
    height: 25px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

#uploadProgressFill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

#uploadResults {
    margin-top: 20px;
}

.upload-result-item {
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-result-item.success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.upload-result-item.error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

@media (max-width: 968px) {
    main {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    .album-art {
        width: 200px;
        height: 200px;
    }
    
    .header-controls {
        flex-direction: column;
    }
    
    .upload-btn {
        width: 100%;
    }
}
