:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --background-color: #f0f2f5;
    --card-background: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-radius: 12px;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

body {
    background-color: #f5f5f5;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
}

.container {
    max-width: 800px !important;
}

.app-title {
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
}

.card {
    background: var(--card-background);
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.download-form {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.download-form input {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
}

.download-form button {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    padding: 0.75rem 1.5rem;
}

.music-player {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    text-align: center;
    width: 100%;
}

.now-playing {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 1rem;
}

#progress-bar {
    background: #e0e0e0;
    height: 4px;
    border-radius: 2px;
    cursor: pointer;
    margin: 0 auto 1rem auto;
    position: relative;
    width: 100%;
}

#progress {
    background: var(--primary-color);
    height: 100%;
    border-radius: 2px;
    position: absolute;
    transition: width 0.1s linear;
}

.player-time-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

#time-display {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn.play-pause {
    background: var(--primary-color);
    color: white;
    width: 48px;
    height: 48px;
}

.control-btn:hover {
    color: var(--primary-color);
    background: rgba(13, 110, 253, 0.1);
}

.control-btn.play-pause:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.playlist {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.playlist h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.playlist-item {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.playlist-item.active {
    background: #e7f1ff;
    color: #007bff;
}

.playlist-item .track-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.playlist-item i {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

.playlist-item .btn-danger {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.playlist-item .btn-danger:hover {
    opacity: 1;
}

.playlist-item:hover .btn-danger {
    opacity: 1;
}

.alert {
    border-radius: 8px;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .app-title {
        font-size: 2rem;
    }
}

.htmx-indicator{
    opacity:0;
    transition: opacity 500ms ease-in;
}
.htmx-request .htmx-indicator{
    opacity:1;
}
.htmx-request.htmx-indicator{
    opacity:1;
}