/* --- КЛАССИЧЕСКАЯ КАПСУЛА МЕНЮ --- */
.bottom-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(39, 39, 42, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 40px;
    display: flex;
    align-items: center;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    width: auto;
    min-width: 300px; /* Чтобы капсула не дергалась слишком сильно */
}

/* Группа навигации */
.nav-links-group {
    display: flex;
    gap: 5px;
    max-width: 400px;
    opacity: 1;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.nav-item {
    display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); padding: 10px; border-radius: 30px;
    cursor: pointer; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.nav-item i { font-size: 24px; }

/* Активная кнопка навигации */
.nav-item.active { background: var(--text-main); color: var(--bg-color); padding: 10px 18px; }
.nav-text { max-width: 0; overflow: hidden; opacity: 0; white-space: nowrap; font-size: 13px; font-weight: 700; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); }
.nav-item.active .nav-text { max-width: 120px; opacity: 1; margin-left: 6px; }

/* Разделитель */
.nav-divider { width: 1px; height: 24px; background: rgba(255,255,255,0.1); margin: 0 4px; transition: all 0.4s; }

/* --- ПЛЕЕР (Справа) --- */
.player-item { padding: 4px; border-radius: 30px; transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1); display: flex; align-items: center; }

.nav-cover-wrap { position: relative; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; cursor: pointer; }
.nav-cover { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* --- АНИМАЦИЯ ЗВУКОВОЙ ВОЛНЫ --- */
.soundwave-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); border-radius: 50%;
    display: flex; align-items: center; justify-content: center; gap: 2px;
    opacity: 0; transition: opacity 0.3s;
}
.soundwave-overlay.playing { opacity: 1; }

.bar { width: 3px; background: #fff; border-radius: 3px; animation: bounce 1s infinite ease-in-out; height: 4px; }
.bar:nth-child(1) { animation-delay: 0s; }
.bar:nth-child(2) { animation-delay: 0.2s; }
.bar:nth-child(3) { animation-delay: 0.4s; }
.bar:nth-child(4) { animation-delay: 0.1s; }

@keyframes bounce {
    0%, 100% { height: 4px; }
    50% { height: 16px; }
}

/* --- СКРЫТЫЙ КОНТЕНТ ПЛЕЕРА --- */
.player-expanded-content {
    display: flex; align-items: center; justify-content: space-between;
    max-width: 0; opacity: 0; overflow: hidden; white-space: nowrap;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.player-info { display: flex; flex-direction: column; margin-left: 12px; cursor: pointer; flex-grow: 1; }
.player-title { font-size: 14px; font-weight: 700; color: var(--bg-color); }
.player-artist { font-size: 11px; color: #555; } /* Темно-серый для белого фона */

.player-actions { display: flex; align-items: center; gap: 12px; margin-left: 15px; margin-right: 5px; }
.action-btn { font-size: 26px; color: var(--bg-color); cursor: pointer; transition: transform 0.2s; }
.action-btn:active { transform: scale(0.8); }
.action-like.liked { color: #ec4899; }
.action-play { font-size: 34px; }

/* ========================================= */
/* МАГИЯ: СОСТОЯНИЕ РАЗВЕРНУТОГО ПЛЕЕРА      */
/* ========================================= */
.bottom-nav.player-expanded { width: 90%; max-width: 380px; }
.bottom-nav.player-expanded .nav-links-group { max-width: 0; opacity: 0; gap: 0; padding: 0; }
.bottom-nav.player-expanded .nav-divider { width: 0; margin: 0; opacity: 0; }
.bottom-nav.player-expanded .player-item {
    background: var(--text-main); /* Белая подложка! */
    width: 100%;
    padding: 6px 10px 6px 6px;
}
.bottom-nav.player-expanded .player-expanded-content { max-width: 300px; opacity: 1; width: 100%; }

/* --- ИСПРАВЛЕНИЯ БАГОВ --- */
/* Прячем волну при развертывании */
.bottom-nav.player-expanded .soundwave-overlay { display: none; }
/* Делаем текст темным на белом фоне */
.bottom-nav.player-expanded .player-title { color: var(--bg-color); }
.bottom-nav.player-expanded .player-artist { color: #555; }
/* Делаем кнопки темными */
.bottom-nav.player-expanded .action-btn { color: var(--bg-color); }
/* Цвет лайка остается розовым, если он нажат */
.bottom-nav.player-expanded .action-like.liked { color: #ec4899; }

/* --- КОНТЕКСТНОЕ МЕНЮ (Осталось без изменений) --- */
.context-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 1001; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.context-overlay.active { opacity: 1; pointer-events: all; }
.player-context-menu { position: absolute; bottom: -100%; left: 0; right: 0; background: #18181b; border-radius: 24px 24px 0 0; padding: 20px 20px 40px; z-index: 1002; transition: bottom 0.4s cubic-bezier(0.25, 1, 0.5, 1); box-shadow: 0 -10px 40px rgba(0,0,0,0.5); }
.player-context-menu.active { bottom: 0; }
.context-drag-handle { width: 40px; height: 4px; background: #3f3f46; border-radius: 2px; margin: 0 auto 20px; }
.context-item { display: flex; align-items: center; gap: 15px; padding: 15px 0; font-size: 16px; font-weight: 500; color: var(--text-main); border-bottom: 1px solid rgba(255,255,255,0.05); cursor: pointer; }
.context-item:last-child { border-bottom: none; }
.context-item i { font-size: 24px; color: var(--text-secondary); }