/* Основной контейнер виджета */
.radio-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border: 1px solid #eaeaea;
}

/* ТЕКУЩИЙ ТРЕК */
.now-playing {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.now-left {
    display: flex;
    align-items: center;
    flex-grow: 1;
    min-width: 0;
    margin-right: 15px;
}
.now-cover {
    width: 180px;
    height: 180px;
    border-radius: 100px;
    border: 3px solid rgba(255,255,255,1);
    margin-right: 14px;
    object-fit: cover;
    flex-shrink: 0;
}
.now-info {
    flex-grow: 1;
    min-width: 0;
}
.now-status {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}
.now-track {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}
.now-button {
    flex-shrink: 0;
    padding-right: 60px;
}

/* ИСТОРИЯ */

.history-title {
    background: transparent;
    font-size: 20px;
    font-weight: 600;
    color: #161616;
    margin: 0;
    padding: 30px 16px 20px 16px;
    border: none;
    text-align: left;
    position: relative;
}

.history-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 16px;
    height: 4px;
    background: linear-gradient(90deg, #2d00a5, transparent);
    border-radius: 1px;
}
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}
.history-item {
    padding: 8px 16px;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    align-items: flex-start; /* Изменено с center на flex-start */
    transition: background 0.15s;
    justify-content: flex-start;
    width: 100%;
    min-height: 32px; /* Минимальная высота для строки */
}
.history-item:hover {
    background: #f9f9f9;
}
.history-item:last-child {
    border-bottom: none;
}
.history-time {
    font-size: 16px; /* Уменьшен шрифт времени */
    color: #888;
    min-width: 65px; /* Уменьшена минимальная ширина */
    margin-right: 10px;
    flex-shrink: 0;
    text-align: left;
    line-height: 1.4;
    padding-top: 1px; /* Выравнивание по верху */
}
.history-track {
    font-size: 18px;
    color: #333;
    white-space: normal; /* Изменено с nowrap на normal */
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
    text-align: left;
    padding-left: 0;
    direction: ltr;
    unicode-bidi: plaintext;
    line-height: 1.4;
    word-break: break-word; /* Перенос длинных слов */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Максимум 2 строки */
    -webkit-box-orient: vertical;
}
.no-history {
    text-align: center;
    color: #999;
    font-size: 13px;
    padding: 20px;
    font-style: italic;
}

/* АДАПТИВНОСТЬ */
@media (max-width: 1000px) {
    .now-track {
        font-size: 24px;
    }
}

@media (max-width: 800px) {
    .now-track {
        font-size: 22px;
    }
    .now-button {
    padding-right: 0px;
}
}

@media (max-width: 480px) {
    .now-playing {
        padding: 14px;
    }
    .now-left {
        margin-right: 10px;
    }
    .now-cover {
        width: 50px;
        height: 50px;
        margin-right: 12px;
    }
    .now-track {
        font-size: 16px;
    }
    .history-item {
        padding: 10px 14px;
    }
    .history-time {
        min-width: 65px;
        font-size: 16px;
    }
    .history-track {
        font-size: 16px;
    }
    .now-button svg {
        width: 60px !important;
        height: 60px !important;
    }
}

/* На очень узких экранах плавно скрываем обложку */
@media (max-width: 400px) {
    .now-cover {
        opacity: 0.7;
        width: 45px;
        height: 45px;
    }
    .now-button svg {
        width: 55px !important;
        height: 55px !important;
    }
}

@media (max-width: 360px) {
    .now-cover {
        display: none !important;
    }
    .now-left {
        margin-right: 0;
    }
    .now-button svg {
        width: 50px !important;
        height: 50px !important;
    }
}

/* ВЫДЕЛЕНИЕ ОСОБОГО ИСПОЛНИТЕЛА */
.history-item.special-artist {
    border-left: 4px solid #52154e; /* Красная полоска слева */
    background-color: rgba(255, 107, 107, 0.05); /* Лёгкий красный фон */
    padding-left: 12px; /* Уменьшаем отступ слева из-за полоски */
}

.history-item.special-artist .history-track {
    color: #52154e; /* Более тёмный красный для текста */
    font-weight: 600;
}

.history-item.special-artist:hover {
    background-color: rgba(255, 107, 107, 0.1); /* Чуть ярче при наведении */
}

/* Для мобильных - немного тоньше полоска */
@media (max-width: 480px) {
    .history-item.special-artist {
        border-left-width: 3px;
        padding-left: 10px;
    }
}

/* ЗЕБРА - ЧЕРЕДУЮЩИЕСЯ СТРОКИ */
.history-item:nth-child(odd) {
    background-color: #f8f9fa; /* Светло-серый для нечётных строк */
}

.history-item:nth-child(even) {
    background-color: white; /* Белый для чётных строк */
}

/* При наведении поверх зебры */
.history-item:hover {
    background-color: #e9ecef !important; /* Переопределяем при наведении */
}

/* Для выделенного исполнителя - с учётом зебры */
.history-item.special-artist:nth-child(odd) {
    background-color: #d6bff64d; /* Лёгкий красный на сером */
}

.history-item.special-artist:nth-child(even) {
    background-color: #d6bff64d; /* Ещё легче на белом */
}

.history-item.special-artist:hover {
    background-color: #d6bff64d !important; /* Ярче при наведении */
}

/* Убираем нижние границы, так как есть фон */
.history-item {
    border-bottom: none;
}

/* Добавляем небольшие отступы между строками */
.history-list {
    padding: 0;
}
.history-item {
    margin-bottom: 1px; /* Тонкая полоска между строками */
}
.history-item:last-child {
    margin-bottom: 0;
}


/* АДАПТИВНОСТЬ - ОБНОВЛЁННАЯ ВЕРСИЯ */
@media (max-width: 1024px) {
    .now-cover {
        width: 120px; /* Средний размер для планшетов */
        height: 120px;
    }
}

@media (max-width: 768px) {
    .now-cover {
        width: 80px; /* Для маленьких планшетов */
        height: 80px;
    }
}

@media (max-width: 480px) {
    .now-playing {
        padding: 14px;
    }
    .now-cover {
        width: 60px; /* ← ИЗМЕНИТЬ: было 50px */
        height: 60px; /* ← ИЗМЕНИТЬ: было 50px */
        margin-right: 12px;
    }
    .now-track {
        font-size: 14px;
    }
    .history-item {
        padding: 10px 14px;
    }
}

/* На очень узких экранах плавно скрываем обложку */
@media (max-width: 400px) {
    .now-cover {
        opacity: 0.7;
        width: 50px; /* ← ИЗМЕНИТЬ: было 45px */
        height: 50px; /* ← ИЗМЕНИТЬ: было 45px */
    }
}

@media (max-width: 360px) {
    .now-cover {
        display: none !important;
    }
}