/* Поиск */
.music-search-container .input-group-text {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px 0 0 8px;
}

.music-search-container .form-control {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

#tracksList .col-md-6 {
    margin-bottom: 1rem;
}

.music-search-container .form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.15);
}

.music-search-container .btn-primary {
    border-radius: 0 8px 8px 0;
}

body.player-visible {
    padding-bottom: 100px;
}

.player-volume {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.volume-bar {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border, #333);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

.volume-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent, #58a6ff);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
}

.volume-bar::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--accent, #58a6ff);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
}

@media (max-width: 480px) {
    .volume-bar {
        width: 60px;
    }
}

/* Мобильная адаптация для поиска */
@media (max-width: 768px) {
    body.player-visible {
        padding-bottom: 140px;
    }
    .music-search-container .input-group {
        flex-wrap: wrap;
    }
    
    .music-search-container .input-group-text,
    .music-search-container .form-control {
        border-radius: 8px 8px 0 0;
        border-bottom: none;
    }
    
    .music-search-container .form-control {
        border-radius: 0 8px 0 0;
    }
    
    .music-search-container .btn-primary {
        border-radius: 0 0 8px 8px;
        width: 100%;
        padding: 0.75rem;
    }
}

.quick-link {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

.quick-link:hover {
    text-decoration: underline;
}

/* Анимации */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.favorite-btn .bi-heart-fill {
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Карточки треков */
.track-cover {
    width: 56px;
    height: 56px;
    object-fit: cover;
    flex-shrink: 0;
}

.min-width-0 {
    min-width: 0;
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-search-container .card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.music-search-container .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Аудиоплеер */
.audio-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary, #1e1e1e);
    border-top: 1px solid var(--border, #333);
    padding: 12px 0;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.player-layout {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.player-cover {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.player-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.player-artist {
    font-size: 0.8rem;
    color: var(--accent, #58a6ff);
    font-weight: 600;
}

.player-title {
    font-size: 0.75rem;
    color: var(--text-secondary, #aaa);
}

.player-artist,
.player-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-primary, #fff);
    font-size: 1.2rem;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent, #58a6ff);
}

.btn-play {
    background: var(--accent, #58a6ff);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-play:hover {
    transform: scale(1.1);
    background: #6bb5ff;
}

.btn-play:active {
    transform: scale(0.95);
}

.player-progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 100%;
    order: 1;
}

.progress-bar {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border, #333);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.progress-bar::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--accent, #58a6ff);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.progress-bar::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent, #58a6ff);
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.time-label {
    font-size: 0.7rem;
    color: var(--text-secondary, #aaa);
    min-width: 32px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-family: monospace;
}

.btn-close-player {
    flex-shrink: 0;
}

#audioPlayer {
    display: none;
}

/* Мобильная адаптация плеера */
@media (max-width: 768px) {
    .player-layout {
        gap: 8px;
    }
    
    .player-info {
        flex: 1 1 40%;
    }
    
    .player-controls {
        gap: 4px;
    }
    
    .btn-play {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
    
    .btn-icon {
        font-size: 1.1rem;
        padding: 4px 6px;
    }
    
    .progress-bar {
        height: 8px;
    }
    
    .progress-bar::-webkit-slider-thumb,
    .progress-bar::-moz-range-thumb {
        width: 24px;
        height: 24px;
    }
    
    .time-label {
        font-size: 0.65rem;
        min-width: 28px;
    }
    
    .player-cover {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .player-layout {
        gap: 6px;
    }
    
    .player-info {
        flex: 1 1 30%;
        gap: 8px;
    }
    
    .player-cover {
        width: 32px;
        height: 32px;
    }
    
    .player-artist {
        font-size: 0.7rem;
    }
    
    .player-title {
        font-size: 0.65rem;
    }
    
    .btn-play {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .btn-icon {
        font-size: 1rem;
    }
    
    .player-progress-container {
        gap: 4px;
    }
    
    .time-label {
        font-size: 0.6rem;
        min-width: 24px;
    }
}