/* ===== СТРАНИЦЫ АРТИСТОВ И АЛЬБОМОВ ===== */
.page-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.artist-page, .album-page {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

.spa-breadcrumb {
    display: block !important;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    padding: 0 0.5rem;
}

.spa-breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.spa-breadcrumb a:hover {
    color: var(--primary-text-color);
    text-decoration: underline;
}

/* ===== ХЕДЕР АРТИСТА С ИСПРАВЛЕНИЯМИ ===== */
.artist-header, .album-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, var(--card-bg-color), rgba(24, 24, 24, 0.7));
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.artist-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(29, 185, 84, 0.05) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes pulse {
    0% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    100% { transform: scale(1.1) rotate(5deg); opacity: 0.1; }
}

.artist-header > *, .album-header > * {
    position: relative;
    z-index: 1;
}

/* ИСПРАВЛЕНИЕ 1: Аватар с hover эффектом превращения в квадрат */
.artist-avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(29, 185, 84, 0.3);
    /* ОПТИМИЗИРОВАНО: Более быстрая анимация */
    transition: transform 0.25s ease-out, border-radius 0.25s ease-out, border-color 0.2s ease;
    cursor: pointer;
    /* ДОБАВЛЕНО: GPU ускорение */
    will-change: transform, border-radius;
}

.artist-avatar:hover {
    /* УПРОЩЕНО: Меньше scale для плавности */
    transform: scale(1.08) translateZ(0);
    border-radius: 12px; /* Уменьшил с 20px для более плавной анимации */
    border-color: var(--accent-color);
    /* УПРОЩЕНО: Убрал сложную тень, оставил простую */
    /* box-shadow: 0 16px 48px rgba(29, 185, 84, 0.25); */
}

.album-cover {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.album-cover:hover {
    transform: scale(1.05);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.6);
}


/* ИСПРАВЛЕНИЕ 2: Заголовки могут занимать всю ширину */
.artist-info h1, .album-info h1 {
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    line-height: 1.1;
    font-weight: 500;
    background: linear-gradient(135deg, var(--primary-text-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.artist-info p, .album-info p {
    color: var(--secondary-text-color);
    max-width: 100%; /* Расширяем описание */
    margin: 0.5rem auto;
    line-height: 1.6;
    font-size: 1rem;
    word-wrap: break-word;
}

.album-stats {
    color: var(--secondary-text-color);
    font-size: 0.95rem;
    margin: 1rem 0;}

/* ИСПРАВЛЕНИЕ 3: Кнопка Discography */
.discography-scroll-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border: none;
    border-radius: 25px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.3);
    text-decoration: none;
    margin-top: 1rem;
}

.discography-scroll-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 185, 84, 0.4);
    background-color: #1ed760;
}

.discography-scroll-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.discography-scroll-btn:hover svg {
    transform: translateY(2px);
}

.artist-links {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.back-link {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    background: rgba(29, 185, 84, 0.1);
    border: 1px solid rgba(29, 185, 84, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    background: rgba(29, 185, 84, 0.2);
    color: var(--primary-text-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 185, 84, 0.2);
}

/* ===== СЕКЦИИ ТРЕКОВ ===== */
.random-section {
    background: linear-gradient(135deg, var(--card-bg-color), rgba(24, 24, 24, 0.8));
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.album-tracks-section {
    background: linear-gradient(135deg, var(--card-bg-color), rgba(24, 24, 24, 0.8));
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ===== ИСПРАВЛЕННЫЕ КНОПКИ ALL TRACKS ===== */
.random-header,
.album-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.random-header h3, 
.album-controls h3 {
    font-size: 2rem;
    margin: 0;
    font-weight: 600;
    color: var(--primary-text-color);
}

/* ИСПРАВЛЕНО: Контейнер кнопок в РЯД */
.track-controls-buttons {
    display: flex;
    flex-direction: row; /* ДОБАВЛЕНО: принудительно в ряд */
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* ИСПРАВЛЕНО: Основная кнопка Play/Pause */
.main-play-btn {
    background: var(--accent-color);
    border: none;
    cursor: pointer;
    color: var(--bg-color);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
    width: 44px;  /* ИСПРАВЛЕНО: фиксированная ширина */
    height: 44px; /* ИСПРАВЛЕНО: фиксированная высота */
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0; /* ДОБАВЛЕНО: не сжимается */
}

.main-play-btn:hover {
    background: #1ed760;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 185, 84, 0.4);
}

/* ИСПРАВЛЕНО: Правильный треугольник Play */
.main-play-btn .play-icon {
    display: block;
    width: 0;
    height: 0;
    /* ИСПРАВЛЕНО: треугольник указывает ВПРАВО */
    border-left: 10px solid var(--bg-color);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    margin-left: 2px; /* Сдвигаем для центрирования */
}

/* ИСПРАВЛЕНО: Правильные полоски Pause */
.main-play-btn .pause-icon {
    display: none;
    width: 12px;
    height: 12px;
    position: relative;
}

/* ИСПРАВЛЕНО: Полоски через border */
.main-play-btn .pause-icon::before {
    content: '';
    position: absolute;
    left: 2px;
    top: 0;
    width: 3px;
    height: 12px;
    background: var(--bg-color);
    border-radius: 1px;
}

.main-play-btn .pause-icon::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 0;
    width: 3px;
    height: 12px;
    background: var(--bg-color);
    border-radius: 1px;
}

/* Переключение состояний */
.main-play-btn.playing .play-icon {
    display: none;
}

.main-play-btn.playing .pause-icon {
    display: block;
}

/* Дополнительные кнопки */
.control-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    color: var(--primary-text-color);
    transition: all 0.2s ease;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    width: 44px;  /* ИСПРАВЛЕНО: фиксированная ширина */
    height: 44px; /* ИСПРАВЛЕНО: фиксированная высота */
    flex-shrink: 0; /* ДОБАВЛЕНО: не сжимается */
}

.control-btn:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--bg-color);
    transform: translateY(-1px);
}

.control-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ===== МОБИЛЬНАЯ АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    .random-header,
    .album-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .random-header h3,
    .album-controls h3 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .track-controls-buttons {
        justify-content: center;
        flex-direction: row; /* ВАЖНО: даже на мобильных в ряд */
    }
    
    .main-play-btn {
        width: 40px;
        height: 40px;
        padding: 0.6rem;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        padding: 0.6rem;
    }
    
    .control-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 480px) {
    .track-controls-buttons {
        gap: 0.75rem;
        justify-content: center;
    }
    
    .main-play-btn {
        width: 36px;
        height: 36px;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
    }
}



/* ИСПРАВЛЕНИЕ 8: Кнопка Show All Tracks */
.track-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* ВАЖНО: По умолчанию все треки видимы */
.track-list .track-item {
    display: flex;
}

/* Ограничиваем только если есть класс limited и НЕТ expanded */
.track-list.limited:not(.expanded) .track-item:nth-child(n+6) {
    display: none !important;
}

/* При expanded все треки видимы */
.track-list.limited.expanded .track-item {
    display: flex !important;
}

/* Кнопка Show All Tracks */
.show-all-tracks-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    border: none;
    color: var(--bg-color);
    cursor: pointer;
    border-radius: 12px;
    margin-top: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.show-all-tracks-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(29, 185, 84, 0.4);
    background-color: #1ed760;
}

.show-all-tracks-btn.hidden {
    display: none;
}


/* ИСПРАВЛЕНИЕ 9: Other Artists секция */
.other-artists-section {
    margin-top: 1rem; /* ИСПРАВЛЕНО: такой же отступ как у дискографии */
    padding: 1rem 1rem 0.75rem 1rem; /* ИСПРАВЛЕНО: уменьшен нижний padding */
    background: linear-gradient(135deg, var(--card-bg-color), rgba(24, 24, 24, 0.8));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.other-artists-section h2 {
    font-size: 2rem;
    margin-top: 0; /* ДОБАВЛЕНО: убираем отступ сверху */
    margin-bottom: 1rem; /* ИСПРАВЛЕНО: такой же как у дискографии */
    text-align: left;
    font-weight: 600;
    color: var(--primary-text-color);
}

.other-artists-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 0.5rem 0 1rem 0; /* ИСПРАВЛЕНО: добавлен отступ сверху для hover */
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) var(--card-bg-color);
    scroll-behavior: smooth;
}

.other-artists-carousel::-webkit-scrollbar {
    height: 6px;
}

.other-artists-carousel::-webkit-scrollbar-track {
    background: var(--card-bg-color);
    border-radius: 3px;
}

.other-artists-carousel::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 3px;
}

.other-artist-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    width: 160px;
    flex-shrink: 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.other-artist-card:hover {
    background-color: rgba(29, 185, 84, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.other-artist-card img {
    width: 100px; /* УВЕЛИЧЕНО: с 80px до 100px */
    height: 100px; /* УВЕЛИЧЕНО: с 80px до 100px */
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.other-artist-card:hover img {
    transform: scale(1.1);
}

.other-artist-card h4 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary-text-color);
    font-weight: 600;
    line-height: 1.2; /* ДОБАВЛЕНО: для лучшего переноса текста */
}

/* Пустые состояния */
.no-tracks, .no-releases {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--secondary-text-color);
    font-style: italic;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
}

.no-tracks::before, .no-releases::before {
    content: '🎵';
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (min-width: 600px) {
    .artist-header, .album-header {
        flex-direction: row;
        text-align: left;
        gap: 3rem;
        padding: 3rem 2rem;
    }
    
    .artist-info, .album-info {
        text-align: left;
        flex: 1;
    }
    
    .artist-avatar {
        width: 220px;
        height: 220px;
    }
    
    .album-cover {
        width: 220px;
        height: 220px;
    }
    
    .artist-info h1, .album-info h1 {
        font-size: 2rem;
    }
    
    .artist-info p, .album-info p {
        margin: 0.5rem 0;
    }
    
    .artist-links {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 0 0.5rem;
    }
    
    .artist-header, .album-header {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
    }
    
    .artist-avatar {
        width: 140px;
        height: 140px;
    }
    
    .album-cover {
        width: 140px;
        height: 140px;
    }
    
    .artist-info h1, .album-info h1 {
        font-size: 2rem;
        line-height: 1.2;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    .artist-info p, .album-info p {
        font-size: 1rem;
        margin: 0.5rem auto;
        text-align: center;
    }
    
    .random-section, .album-tracks-section, .tabs-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
    
    .random-header h3, .album-controls h3 {
        font-size: 1.5rem;
    }
    
    .tab-nav {
        gap: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    .other-artist-card {
        width: 120px;
        padding: 1rem;
    }
    
    .other-artist-card img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .artist-info h1, .album-info h1 {
        font-size: 1.8rem;
    }
    
    .artist-avatar, .album-cover {
        width: 120px;
        height: 120px;
    }
    
    .artist-info p, .album-info p {
        font-size: 0.9rem;
    }
    
    .random-section, .album-tracks-section, .tabs-section {
        padding: 1rem;
    }
    
    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .back-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .control-btn {
        padding: 0.5rem;
        min-width: 36px;
    }
}

@media (min-width: 1200px) {
    .artist-avatar {
        width: 250px;
        height: 250px;
    }
    
    .album-cover {
        width: 250px;
        height: 250px;
    }
    
    .artist-info h1, .album-info h1 {
        font-size: 2.8rem;
    }
    
    .artist-header, .album-header {
        padding: 4rem 3rem;
    }
    
    .random-section, .album-tracks-section, .tabs-section {
        padding: 3rem;
    }
}
@media (max-width: 768px) {
    .other-artists-section {
        margin-top: 0.75rem; /* Соответствует дискографии */
        padding: 1rem 1rem 0.5rem 1rem;
    }
    
    .other-artists-section h2 {
        font-size: 1.8rem;
        margin-bottom: 0.75rem;
    }
    
    .other-artists-carousel {
        padding: 0.25rem 0 0.75rem 0; /* Меньше отступы на мобильных */
    }
    
    .other-artist-card {
        width: 140px; /* Немного меньше на мобильных */
        padding: 1rem;
    }
    
    .other-artist-card img {
        width: 80px; /* На мобильных оставляем меньше */
        height: 80px;
    }
}

@media (max-width: 480px) {
    .other-artists-section {
        margin-top: 0.5rem; /* Соответствует дискографии */
        padding: 0.75rem 0.75rem 0.5rem 0.75rem;
    }
    
    .other-artists-section h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .other-artist-card {
        width: 120px;
        padding: 1rem;
    }
    
    .other-artist-card img {
        width: 70px;
        height: 70px;
    }
    
    .other-artist-card h4 {
        font-size: 0.9rem;
    }
}

@media (min-width: 1200px) {
    .other-artists-section {
        padding: 1.5rem 2rem 1rem 2rem;
    }
    
    .other-artists-section h2 {
        font-size: 2rem;
        margin-bottom: 1.25rem;
    }
    
    .other-artists-carousel {
        gap: 2rem;
        padding: 0.75rem 0 1rem 0;
    }
    
    .other-artist-card {
        width: 180px;
        padding: 2rem;
    }
    
    .other-artist-card img {
        width: 120px; /* Еще больше на больших экранах */
        height: 120px;
    }
}