/* mobile/06-album.css - Mobile Album Pages Component */

/* === MOBILE BREAKPOINTS === */
@media (max-width: 768px) {

/* === ALBUM COVER SPECIFIC === */
.album-cover {
    border-radius: 12px; /* ИСПРАВЛЕНО: всегда квадратные углы для обложек альбомов */
}

/* === MOBILE ALBUM STATS === */
.album-stats-simple {
    font-size: 0.9rem; /* МОБИЛЬНАЯ: меньше */
    color: var(--secondary-text-color);
    font-family: var(--font-secondary);
    margin: 0.5rem 0 1rem 0;
    font-weight: 400;
    text-align: center; /* МОБИЛЬНАЯ: центрируем */
}

/* === MOBILE ARTIST LINKS === */
.artist-links {
    margin-top: 1rem;
    text-align: center; /* МОБИЛЬНАЯ: центрируем */
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    text-decoration: none;
    font-family: var(--font-secondary);
    font-size: 0.85rem; /* МОБИЛЬНАЯ: меньше */
    transition: var(--transition-base);
    padding: 0.5rem 1rem;
    border-radius: 6px; /* МОБИЛЬНАЯ: меньше */
    border: 1px solid rgba(29, 185, 84, 0.3);
    background: rgba(29, 185, 84, 0.1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.back-link:active {
    color: var(--accent-hover-color);
    background: rgba(29, 185, 84, 0.2);
    border-color: var(--accent-hover-color);
    transform: scale(0.98);
}

/* === MOBILE ALBUM TRACKS SECTION === */
.album-tracks-section {
    margin-bottom: var(--mobile-artist-album-section-gap); /* ИСПРАВЛЕНО: используем общую переменную */
    padding: 1.5rem; /* ИСПРАВЛЕНО: как в common стилях */
    background: var(--artist-album-section-bg); /* ИСПРАВЛЕНО: используем общую переменную */
    border-radius: 12px; /* ИСПРАВЛЕНО: как в common стилях */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3); /* ДОБАВЛЕНО: как в common */
    backdrop-filter: blur(8px); /* ДОБАВЛЕНО: как в common */
    -webkit-backdrop-filter: blur(8px);
}

/* Альбом показывает ВСЕ треки без ограничений */
.album-tracks-section .track-list .track-item {
    display: flex; /* Показываем все треки */
}

/* === MOBILE ALBUM CONTROLS HEADER - ИСПРАВЛЕНО === */
.album-controls {
    display: flex;
    align-items: center; /* ИСПРАВЛЕНО: как в common стилях */
    justify-content: space-between; /* ИСПРАВЛЕНО: как в common стилях */
    margin-bottom: 1.5rem;
    padding: 0; /* ИСПРАВЛЕНО: убираем лишний padding */
    background: transparent; /* ИСПРАВЛЕНО: как в common стилях */
    border-radius: 0; /* ИСПРАВЛЕНО: убираем */
    border: none; /* ИСПРАВЛЕНО: убираем */
    min-height: 50px; /* ИСПРАВЛЕНО: как в common стилях */
    flex-wrap: wrap; /* ДОБАВЛЕНО: для переноса на узких экранах */
    text-align: left; /* ИСПРАВЛЕНО: выравнивание по левому краю */
}

.album-controls h3 {
    margin: 0;
    font-size: 1.5rem; /* КАК В COMMON */
    font-weight: 600;
    color: var(--primary-text-color);
    font-family: var(--font-primary);
    position: relative;
    padding-bottom: 0.75rem; /* ДОБАВЛЕНО: как в common */
    flex: 1;
    display: flex;
    align-items: center; /* ИСПРАВЛЕНО: центрируем по вертикали */
    text-align: left; /* ИСПРАВЛЕНО: левое выравнивание */
}

/* ДОБАВЛЕНО: подчеркивание как в common стилях */
.album-controls h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0; /* ИСПРАВЛЕНО: слева, не по центру */
    width: 40px;
    height: 2px;
    background: var(--accent-color);
    border-radius: 1px;
}

/* === MOBILE CONTROL BUTTONS - ИСПОЛЬЗУЕМ ОБЩИЕ СТИЛИ === */
.track-controls-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center; /* ИСПРАВЛЕНО: центрируем кнопки */
    gap: 0.5rem; /* ИСПРАВЛЕНО: как в common стилях */
    margin-top: 0; /* ИСПРАВЛЕНО: убираем отступ сверху */
    flex-wrap: wrap;
    flex-shrink: 0; /* СОХРАНЯЕМ: не сжимаем кнопки */
}

/* УДАЛЯЕМ ДУБЛИРУЮЩИЕ СТИЛИ - используем из common файла */
/* .main-play-btn и .control-btn наследуются из mobile/05-artist-album-common.css */

/* === MOBILE ALBUM METADATA === */
.album-metadata {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.album-metadata-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 1rem; /* ДОБАВЛЕНО: для мобильных */
}

.album-metadata-item:last-child {
    border-bottom: none;
}

.metadata-label {
    font-size: var(--font-size-xs);
    color: var(--secondary-text-color);
    font-family: var(--font-secondary);
    font-weight: 500;
    flex-shrink: 0; /* ДОБАВЛЕНО: не сжимаем лейблы */
}

.metadata-value {
    font-size: var(--font-size-xs);
    color: var(--primary-text-color);
    font-family: var(--font-secondary);
    font-variant-numeric: tabular-nums;
    text-align: right;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* === MOBILE ALBUM SPECIFIC TRACK STYLING - ИСПОЛЬЗУЕМ ОБЩИЕ СТИЛИ === */
/* Треки наследуются из mobile/05-artist-album-common.css */
.album-tracks-section .track-item {
    justify-content: space-between; /* СОХРАНЯЕМ: специфично для альбомов */
}

.album-tracks-section .track-item:active .track-item-title {
    color: var(--accent-color);
}

.album-tracks-section .track-item:active .track-number,
.album-tracks-section .track-item:active .track-item-duration {
    color: var(--primary-text-color);
}


/* === MOBILE OTHER RELEASES (клон мобильной releases-carousel) === */
.other-releases-section {
position: relative;
margin-bottom: var(--mobile-home-section-margin);
padding: var(--spacing-current-lg);
background: var(--artist-album-section-bg);
border-radius: var(--radius-lg);
border: 1px solid rgba(255, 255, 255, 0.05);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}

.other-releases-section h2 {
margin: 0 0 var(--spacing-current-lg) 0;
font-size: 1.25rem;
font-weight: 700;
color: var(--primary-text-color);
font-family: var(--font-primary);
position: relative;
padding: 0;
}

.other-releases-section h2::after {
content: '';
position: absolute;
bottom: -8px;
left: 0;
width: 60px;
height: 4px;
background: var(--accent-color);
border-radius: 2px;
}

/* Контейнер карусели — 1:1 как мобильная releases-carousel */
.other-releases-carousel {
display: flex;
gap: var(--spacing-current-xl);
overflow-x: auto;
overflow-y: visible; /* как на главной */
scroll-behavior: smooth;
-webkit-overflow-scrolling: touch;
scroll-snap-type: x mandatory;
padding: var(--spacing-current-md) 0 var(--spacing-current-xl) 0;
margin: 0;
box-sizing: border-box;
width: 100%;
scrollbar-width: thin;
scrollbar-color: var(--accent-color) rgba(255, 255, 255, 0.1);
contain: layout;
}

/* Скроллбары */
.other-releases-carousel::-webkit-scrollbar {
height: 8px;
display: block;
}
.other-releases-carousel::-webkit-scrollbar-track {
background: rgba(255, 255, 255, 0.1);
border-radius: 4px;
}
.other-releases-carousel::-webkit-scrollbar-thumb {
background: var(--accent-color);
border-radius: 4px;
transition: background var(--transition-base);
}
.other-releases-carousel::-webkit-scrollbar-thumb:hover {
background: var(--accent-hover-color);
}

/* Карточка — клон release-carousel-card, без .artist-name */
.other-release-card {
background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: var(--radius-lg);
padding: var(--mobile-home-card-padding);
width: var(--mobile-home-release-card-width);
min-width: var(--mobile-home-release-card-width);
flex-shrink: 0;
text-align: center;
transition: var(--transition-base);
cursor: pointer;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
position: relative;
scroll-snap-align: start;
box-sizing: border-box;
will-change: transform;
contain: layout style;
-webkit-tap-highlight-color: transparent;
touch-action: manipulation;
}

.other-release-card:active {
background: rgba(255, 255, 255, 0.12);
border-color: var(--accent-color);
transform: translateY(-4px) translateZ(0);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.other-release-card:focus-visible {
outline: 2px solid var(--accent-color);
outline-offset: 2px;
}

/* Обложка — те же размеры и отступы, что на главной */
.other-release-card img {
width: var(--mobile-home-release-img-size);
height: var(--mobile-home-release-img-size);
border-radius: var(--radius-md);
object-fit: cover;
margin: 0 0 var(--spacing-current-md) 0;
transition: var(--transition-base);
border: 2px solid rgba(255, 255, 255, 0.1);
will-change: transform;
image-rendering: -webkit-optimize-contrast;
image-rendering: optimize-contrast;
}

.other-release-card:active img {
transform: scale(1.05) translateZ(0);
border-color: var(--accent-color);
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Заголовок — line-clamp: 2, как на главной */
.other-release-card h4 {
margin: 0 0 var(--spacing-current-xs) 0;
font-size: var(--font-size-sm);
font-weight: 600;
color: var(--primary-text-color);
line-height: 1.2;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-align: center;
font-family: var(--font-primary);
word-wrap: break-word;
}

.other-release-card:active h4 {
color: var(--accent-color);
}

/* Бейдж типа релиза — те же размеры и позиция */
.other-release-card .release-type {
position: absolute;
top: var(--spacing-current-md);
right: var(--spacing-current-md);
background: var(--accent-color);
color: var(--bg-color);
padding: var(--spacing-current-xs) var(--spacing-current-sm);
border-radius: var(--radius-sm);
font-size: var(--font-size-xs);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
font-family: var(--font-secondary);
z-index: 1;
box-shadow: 0 2px 8px rgba(29, 185, 84, 0.3);
}


/* === MOBILE RELEASE ARTIST === */
.release-artist {
    font-size: var(--font-size-xs);
    color: var(--secondary-text-color);
    font-family: var(--font-secondary);
    margin-top: 0.5rem;
    font-style: italic;
    text-align: center; /* МОБИЛЬНАЯ: центрируем */
}

} /* Конец основного mobile media query */

/* === MOBILE SMALL SCREENS === */
@media (max-width: 480px) {
    .album-tracks-section {
        padding: 1rem;
    }
    
    .album-controls h3 {
        font-size: 1.25rem;
    }
    
    .album-controls h3::after {
        width: 30px; /* МЕНЬШЕ для маленьких экранов */
    }
    
    .album-metadata {
        padding: 0.75rem;
    }
    
    .album-metadata-item {
        padding: 0.4rem 0;
        flex-direction: column; /* ВЕРТИКАЛЬНАЯ компоновка */
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .metadata-value {
        text-align: left; /* ЛЕВОЕ выравнивание */
    }
    
    .back-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    .other-releases-section {
    padding: var(--spacing-current-md);
    margin-bottom: var(--mobile-home-section-margin);
    }
    .other-releases-carousel {
    gap: var(--mobile-home-carousel-gap);
    padding: 6px 0 16px 0;
    }
    .other-release-card {
    width: var(--mobile-home-release-card-width-small);
    min-width: var(--mobile-home-release-card-width-small);
    padding: var(--mobile-home-card-padding-small);
    }
    .other-release-card img {
    width: var(--mobile-home-release-img-size-small);
    height: var(--mobile-home-release-img-size-small);
    margin: 0 0 var(--spacing-current-sm) 0;
    }
    .other-release-card h4 {
    font-size: var(--font-size-xs);
    }
}

@media (max-width: 360px) {
    .album-controls h3 {
        font-size: 1.125rem;
    }
    
    .track-controls-buttons {
        gap: 0.5rem;
    }
    
    .album-metadata-item {
        padding: 0.3rem 0;
    }
    
    .back-link {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    .other-releases-carousel {
    gap: var(--mobile-home-carousel-gap-small);
    }
    .other-release-card {
    width: var(--mobile-home-release-card-width-tiny);
    min-width: var(--mobile-home-release-card-width-tiny);
    }
    .other-release-card img {
    width: var(--mobile-home-release-img-size-tiny);
    height: var(--mobile-home-release-img-size-tiny);
    }
    .other-release-card h4 {
    font-size: var(--font-size-xs);
    }


}

/* === MOBILE ACCESSIBILITY === */
@media (max-width: 768px) and (prefers-contrast: high) {
    .album-tracks-section,
    .album-metadata {
        border: 2px solid var(--accent-color);
    }
    
    .back-link {
        border: 2px solid var(--accent-color);
    }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    .back-link:active {
        transform: none;
    }
}

/* === MOBILE COMPONENT ISOLATION === */
@media (max-width: 768px) {
    .album-page * {
        box-sizing: border-box;
    }
    
    .album-page a {
        color: inherit;
        text-decoration: none;
    }
    
    .album-page button {
        font-family: inherit;
    }
    
    /* === MOBILE PERFORMANCE OPTIMIZATIONS === */
    .album-tracks-section,
    .album-metadata {
        contain: layout style;
    }
    
    /* === MOBILE LEGACY SUPPORT === */
    @supports not (backdrop-filter: blur(8px)) {
        .album-tracks-section {
            background: rgba(24, 24, 24, 0.95);
        }
    }
}
