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

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: auto 1fr;
    height: 100vh;
}

.header {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.header h1 {
    font-size: 24px;
}

.btn-back {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-back:hover {
    background: rgba(255,255,255,0.3);
}

.sidebar {
    background: white;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    font-size: 18px;
    color: #333;
}

.btn-create {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-create:hover {
    background: #5568d3;
}

.playlists-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.playlist-item {
    padding: 15px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-item:hover {
    background: #e9ecef;
}

.playlist-item.active {
    background: #667eea;
    color: white;
}

.playlist-item-name {
    flex: 1;
}

.playlist-item-count {
    font-size: 12px;
    opacity: 0.7;
}

.main-content {
    background: white;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.playlist-header {
    padding: 20px 30px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-header h2 {
    font-size: 22px;
    color: #333;
}

.playlist-actions {
    display: flex;
    gap: 10px;
}

.btn-action {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-action:hover {
    background: #5568d3;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

.upload-section {
    padding: 20px 30px;
    border-bottom: 1px solid #ddd;
}

#uploadFiles {
    display: none;
}

.btn-upload {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-upload:hover {
    background: #218838;
}

.tracks-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

.track-item {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: move;
    transition: all 0.3s;
}

.track-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.track-item.dragging {
    opacity: 0.5;
}

.track-handle {
    font-size: 20px;
    color: #999;
    cursor: move;
}

.track-number {
    font-weight: bold;
    color: #667eea;
    min-width: 30px;
}

.track-name {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.track-actions {
    display: flex;
    gap: 10px;
}

.btn-track-action {
    background: none;
    border: none;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    transition: all 0.3s;
}

.btn-track-action:hover {
    color: #667eea;
}

.btn-track-delete {
    color: #dc3545;
}

.btn-track-delete:hover {
    color: #c82333;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    min-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 20px;
}

.modal-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}
