/* Автономный плеер - полная изоляция стилей */
.standalone-player * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.standalone-player {
    --player-red: #e9252c;
    --player-white: #ffffff;
    --player-dark: #161616;
    --player-gray: #343a40;
    --player-overlay: rgba(0, 0, 0, 0.7);
    
    width: 100%;
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--player-white);
    background: linear-gradient(145deg, #1e1e1e, #2d2d2d);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Фоновое размытие при проигрывании */
.standalone-player.playing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: var(--track-cover, none);
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.3);
    z-index: -1;
    opacity: 1;
    transition: opacity 0.8s ease;
}

.standalone-player.playing {
    position: relative;
    background: transparent;
    backdrop-filter: blur(2px);
}

/* Основной контейнер */
.player-main {
    display: flex;
    padding: 24px;
    gap: 24px;
    height: auto;
    align-items: flex-start; /* Важно: выравниваем по верхнему краю */
}

/* Левая колонка (40%) */
.player-left-column {
    width: 40%;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(5px);
    height: fit-content; /* Высота по контенту */
    align-self: flex-start; /* Прижимаем к верху */
}

/* Обложка - теперь полностью статичная, без интерактивности */
.cover-container {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid var(--player-dark);
   /* box-shadow: 0 10px 10px rgba(0, 0, 0, 0.4);*/
    /* Убраны cursor: pointer и все transition эффекты */
    cursor: default;
}

.cover-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Убираем возможные переходы у картинки */
    transition: none;
}

/* Контролы под обложкой */
.controls-wrapper {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Кнопки управления */
.controls-row {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.control-btn {
    background-color: var(--player-red);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.control-btn:hover {
    background-color: #c11e24;
    transform: scale(1.05);
}

/* Регулятор громкости */
.volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.volume-icon {
    color: var(--player-red);
    font-size: 18px;
    min-width: 24px;
    text-align: center;
}

.volume-bar {
    flex-grow: 1;
    height: 6px;
    background-color: #555;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.volume-progress {
    height: 100%;
    background-color: var(--player-red);
    width: 80%;
    border-radius: 3px;
    pointer-events: none;
}

/* Визуализатор */
.visualizer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 40px;
    margin: 5px 0;
    gap: 2px;
}

.visualizer-bar {
    background-color: var(--player-red);
    width: 8%;
    min-height: 2px;
    transition: height 0.1s ease-out;
    border-radius: 2px 2px 0 0;
}

/* Прогресс-бар */
.progress-container {
    width: 100%;
    margin: 5px 0;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #555;
    border-radius: 3px;
    cursor: pointer;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: var(--player-red);
    width: 0%;
    border-radius: 3px;
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: var(--player-red);
    font-size: 13px;
    margin-top: 5px;
}

/* Текстовый блок в левой колонке (прижат к низу) */
.left-footer-text {
    margin-top: auto;
    padding-top: 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    border-top: 1px solid rgba(233, 37, 44, 0.3);
    line-height: 1.5;
}

.left-footer-text p {
    margin: 5px 0;
}

.left-footer-text .highlight {
    color: var(--player-red);
    font-weight: bold;
}

/* Правая колонка (60%) */
.player-right-column {
    width: 60%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 20px;
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    height: fit-content; /* Высота по контенту */
    align-self: flex-start; /* Прижимаем к верху */
}

/* Информация о треке */
.song-info {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.song-title {
    font-size: 26px;
    font-weight: bold;
    color: var(--player-white);
    margin-bottom: 5px;
    word-break: break-word;
}

.song-artist {
    font-size: 18px;
    color: var(--player-red);
}

/* Плейлист */
.playlist-container {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.playlist {
    list-style: none;
}

.playlist-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 12px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.03);
}

.playlist-item:hover {
    background-color: rgba(233, 37, 44, 0.2);
}

.playlist-item.playing {
    background-color: rgba(233, 37, 44, 0.3);
    border-left: 3px solid var(--player-red);
}

.playlist-cover {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 12px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--player-dark);
}

.playlist-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-info {
    flex-grow: 1;
    min-width: 0;
}

.playlist-title {
    font-weight: bold;
    color: var(--player-white);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
}

.playlist-artist {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-additional {
    font-size: 11px;
    color: var(--player-red);
    margin-left: 10px;
    white-space: nowrap;
    background: rgba(0,0,0,0.3);
    padding: 2px 8px;
    border-radius: 20px;
}

/* Кнопка "Показать все" */
.spoiler-btn {
    background-color: transparent;
    border: 1px solid var(--player-red);
    color: var(--player-red);
    padding: 10px;
    cursor: pointer;
    display: block;
    width: 100%;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
    border-radius: 30px;
    margin-top: 15px;
}

.spoiler-btn:hover {
    background-color: var(--player-red);
    color: white;
}

.hidden-playlist {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.hidden-playlist.expanded {
    max-height: 2000px;
    overflow: visible; /* Меняем с hidden на visible */
}

/* Адаптивность */
@media (max-width: 768px) {
    .player-main {
        flex-direction: column;
        padding: 16px;
    }
    
    .player-left-column,
    .player-right-column {
        width: 100%;
    }
    
    .song-title {
        font-size: 22px;
    }
    
    .song-artist {
        font-size: 16px;
    }
}