* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.app-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background-color: #2196f3;
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

h1, h2 {
    text-align: center;
}

.player-section {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.now-playing {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

#cover-art {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    margin-right: 20px;
}

.track-info {
    flex-grow: 1;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.control-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #2196f3;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.control-btn:hover {
    background-color: #e3f2fd;
}

.progress-bar {
    width: 100%;
}

#progress {
    width: 100%;
    margin-bottom: 10px;
}

.time {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #666;
}

.playlist-section {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.playlist-controls {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.btn {
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn:hover {
    background-color: #1976d2;
}

.btn-secondary {
    background-color: #757575;
}

.btn-secondary:hover {
    background-color: #616161;
}

.playlist-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
}

.modal h2 {
    margin-bottom: 20px;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal input[type="text"],
.modal textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.modal textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Upload Area Styles */
.upload-status {
    padding: 15px;
    margin: 10px 0;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.upload-status.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.upload-status.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.upload-area {
    border: 2px dashed #2196f3;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f5f5f5;
}

.upload-area:hover {
    background-color: #e3f2fd;
    border-color: #1976d2;
}

.upload-area i {
    font-size: 48px;
    color: #2196f3;
    margin-bottom: 10px;
}

.upload-area p {
    margin: 10px 0;
    color: #666;
}

.upload-preview {
    margin-top: 20px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
}

.upload-preview-item {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background-color: white;
}

.upload-preview-item:last-child {
    border-bottom: none;
}

.upload-preview-item img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 5px;
}

.upload-preview-item h4 {
    margin: 0;
    font-size: 0.9em;
}

.upload-preview-item p {
    margin: 5px 0 0;
    font-size: 0.8em;
    color: #666;
}

@media (max-width: 768px) {
    .app-container {
        padding: 10px;
    }
    
    .now-playing {
        flex-direction: column;
        text-align: center;
    }
    
    #cover-art {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .playlist-controls {
        flex-direction: column;
    }

    .modal-content {
        margin: 20% auto;
        width: 95%;
    }
}

.playlist-item {
    position: relative;
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.playlist-item:hover {
    transform: translateY(-2px);
}

.playlist-item img {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    margin-right: 15px;
}

.playlist-item .track-info {
    flex-grow: 1;
}

.playlist-item .track-info h3 {
    margin: 0;
    font-size: 1.1em;
}

.playlist-item .track-info p {
    margin: 5px 0 0;
    color: #666;
    font-size: 0.9em;
}

.remove-track,
.delete-playlist {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #ff5252;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.remove-track:hover,
.delete-playlist:hover {
    background-color: rgba(255, 82, 82, 0.1);
}

.playlist-info {
    padding-right: 40px;
}

.playlist-info h3 {
    margin: 0;
    font-size: 1.2em;
}

.playlist-info p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9em;
} 