/* тень и скругление для блоков*/

  .blokgl:hover {
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2); /* Тень при наведении */
    border-radius: 15px 15px 15px 15px !important; 
  }


/* Стиль для блоков участников топчарт, настарте и т.д.*/

  .blok-shadow:hover {
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2); /* Тень при наведении */
    border-radius: 15px 15px 15px 15px !important; 
  }
  


/* плееры для блоков участников на старте, топ чарт и т.д.*/

.audio-toggle {
  cursor: pointer;
  width: 50px; /* Размер по умолчанию для больших экранов */
  height: 50px;
}

/* Размеры для мобильных устройств */
@media (max-width: 768px) { /* Для устройств с шириной экрана до 768px */
  .audio-toggle {
    width: 50px;  /* Размер кнопки Play/Pause для мобильных */
    height: 50px;
  }
}

/* Размеры для еще меньших устройств, например, телефонов */
@media (max-width: 480px) { /* Для устройств с шириной экрана до 480px */
  .audio-toggle {
    width: 30px;  /* Еще меньший размер для кнопок */
    height: 30px;
  }
}

/* Стиль для странице программы */

  .blok-shadoww {
    transition: box-shadow 0.3s ease, border-radius 0.3s ease;
    border-radius: 0 0 15px 15px !important; /* Принудительное закругление */
    overflow: hidden; /* Убирает артефакты при закруглении, если есть фоновое изображение */
  }
  
  .foto-u1 {
    transition: box-shadow 0.3s ease, border-radius 0.3s ease;
    border-radius: 15px 15px 0 0 !important; /* Принудительное закругление */
    overflow: hidden; /* Убирает артефакты при закруглении, если есть фоновое изображение */
  }


/* Плей лист */

/* Базовые стили для контейнера песен */
.my_lastsongs {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.song-container {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    margin: 10px 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.25s ease;
    width: 100%;
    box-sizing: border-box;
}

.song-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.my_lastsong_cover {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.song-details {
    flex: 1;
    min-width: 0;
}

.song-title {
    font: 600 18px/1.3 'Montserrat', sans-serif;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.song-time {
    font: 500 14px/1.3 'Montserrat', sans-serif;
    color: #666;
    display: block;
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .song-container {
        gap: 10px;
        padding: 10px;
    }
    
    .my_lastsong_cover {
        width: 45px;
        height: 45px;
    }
    
    .song-title {
        font-size: 16px;
    }
    
    .song-time {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .song-container {
        gap: 8px;
        padding: 8px;
    }
    
    .my_lastsong_cover {
        width: 40px;
        height: 40px;
    }
    
    .song-title {
        font-size: 14px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .song-time {
        font-size: 12px;
    }
}
/* /Плей лист */

/* при наведени на пункты меню */
  .my-classgl {
    text-decoration: none;
    transition: opacity 300ms cubic-bezier(0.51, 0.92, 0.24, 1);
}
.my-classgl::after {
    --scale: 0;
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 3px; border-radius: 5px;
    background: linear-gradient(135deg, #d91f7d, #d91f7d);
    transform: scaleX(var(--scale));
    transform-origin: var(--x) 50%;
    transition: transform 300ms cubic-bezier(0.51, 0.92, 0.24, 1);
}
.my-classgl:hover {
    opacity: 1;
}
.my-classgl:hover::after {
    --scale: 1;
}
  document.querySelectorAll('.my-classgl').forEach((elem) => {
	elem.onmouseenter = elem.onmouseleave = (e) => {
        const tolerance = 10;
		const left = 0;
		const right = elem.clientWidth;
		let x = e.pageX - elem.offsetLeft;
		if (x - tolerance < left) x = left;
		if (x + tolerance > right) x = right;
		elem.style.setProperty('--x', `${ x }px`);
	}
});




