/* View Sections */
.view-section {
    display: none;
    animation: fadeIn 0.4s var(--ease-out);
}

.view-section.active {
    display: block;
}

/* Playlist Category Modal (Specific) */
#playlist-categories-modal {
    background-color: var(--modal-bg) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
}

#playlist-categories-modal .cat-label {
    color: var(--text-primary) !important;
    opacity: 0.8 !important;
}

#playlist-categories-modal .cat-row {
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    margin-bottom: 10px !important;
}

#playlist-categories-modal .cat-tag-item {
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

#playlist-categories-modal .cat-tag-item:hover {
    color: #fff;
    background: var(--c-active-bg);
    text-decoration: none;
}

body.light-mode #playlist-categories-modal .cat-tag-item:hover {
    color: #fff;
}

.cat-tag-sep {
    color: var(--glass-border) !important;
}

#pl-cat-current {
    color: var(--text-primary) !important;
}

#btn-cat-toggle {
    color: var(--text-primary) !important;
    border-color: var(--glass-border) !important;
    background: var(--input-bg) !important;
}

#btn-cat-toggle:hover {
    background: var(--item-hover-bg) !important;
}

#pl-square-page-info {
    color: var(--text-secondary) !important;
}

/* Online Playlists Grid */
#online-playlists-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr) !important;
    grid-template-rows: repeat(4, min-content) !important;
    gap: 25px 10px !important;
    align-content: start !important;
    padding: 15px 30px 0 30px;
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    box-sizing: border-box;
}

#online-playlists-grid .tile-item {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
}

#online-playlists-grid .tile-item .tile-cover {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.4s ease;
}

#online-playlists-grid .tile-item:hover {
    transform: translateY(-6px) scale(1.02);
    z-index: 10;
}

#online-playlists-grid .tile-item:hover .tile-cover {
    transform: scale(1.15) !important;
    filter: brightness(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

#online-playlists-grid .tile-item>div:first-child {
    overflow: hidden !important;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.4s ease;
}

/* Radio Views */
.radio-categories {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    scrollbar-width: none;
}

.radio-categories::-webkit-scrollbar {
    display: none;
}

.radio-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
}

.radio-category-item:hover {
    transform: translateY(-3px);
}

.radio-category-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
    transition: all 0.3s var(--ease-out);
}

.radio-category-item:hover .radio-category-icon {
    background: rgba(255, 255, 255, 0.1);
}

.radio-category-name {
    font-size: 12px;
    opacity: 0.8;
    text-align: center;
}

.radio-content-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 20px;
}

.radio-panel {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 20px;
}

.radio-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.radio-panel-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.radio-more-link {
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s;
}

.radio-more-link:hover {
    color: var(--c-player-main);
}

.radio-program-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-program-item {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    align-items: center;
}

.radio-program-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.radio-program-rank {
    width: 30px;
    font-size: 16px;
    font-weight: bold;
    color: #666;
    text-align: center;
    flex-shrink: 0;
}

.radio-program-rank.top3 {
    color: #ff6b6b;
}

.radio-program-cover {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.radio-program-info {
    flex: 1;
    min-width: 0;
}

.program-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 4px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.program-dj {
    font-size: 12px;
    opacity: 0.7;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

/* Radio Detail Overrides */
#radio-detail-view {
    padding: 0 !important;
}

#radio-programs-list {
    padding: 10px 30px;
    overflow-x: hidden;
    overflow-y: auto;
    gap: 6px;
    scrollbar-width: none;
}

#radio-programs-list::-webkit-scrollbar {
    display: none;
}

#radio-detail-view .song-item {
    padding: 8.5px 20px;
    margin-bottom: 0.5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#radio-detail-view .list-header {
    padding: 0 30px 0 30px !important;
    margin-top: -5px;
    min-height: 40px;
}

#radio-detail-view .list-header-row {
    padding: 5px 30px 8px 30px !important;
    margin-bottom: 5px;
    border-bottom: none !important;
}

#radio-programs-pagination {
    padding: 10px 0 0 0 !important;
    background: none !important;
    margin-top: auto;
}

#radio-category-detail-view>div:not(.detail-back-btn):not(.list-header) {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

#radio-category-detail-view>div:not(.detail-back-btn):not(.list-header)>div {
    min-width: 0;
}

#category-featured-radios {
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 12px !important;
}

#category-featured-radios .tile-item {
    text-align: center;
}

#category-featured-radios .tile-cover {
    width: 100% !important;
    aspect-ratio: 1 !important;
}

/* Artist Views */
.artist-header {
    position: relative;
    width: 100%;
    height: 340px;
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    background: #1a1a1a;
    display: flex;
    align-items: flex-end;
}

.artist-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.artist-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(50px) brightness(0.6);
    transform: scale(1.1);
}

.artist-info-content {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 40px;
    display: flex;
    align-items: flex-end;
    gap: 30px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
}

.artist-avatar-wrapper {
    flex-shrink: 0;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 4px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.artist-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.artist-text-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 10px;
}

.artist-name {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.artist-alias {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.artist-alias-tag {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.artist-brief {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.artist-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0;
}

.artist-tab {
    padding: 12px 25px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.3s var(--ease-out);
    border-radius: 10px 10px 0 0;
}

.artist-tab i {
    margin-right: 6px;
}

.artist-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.artist-tab.active {
    color: var(--c-player-main);
    background: rgba(115, 188, 228, 0.1);
}

.artist-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--c-player-main);
    border-radius: 3px 3px 0 0;
}

.artist-content {
    display: none;
    animation: fadeIn 0.4s var(--ease-out);
}

.artist-content.active {
    display: block !important;
}

.artist-introduction {
    padding: 20px;
}

.intro-section {
    margin-bottom: 30px;
}

.intro-section h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.intro-section p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.artist-content .song-item,
#album-detail-view .song-item {
    padding: 12px 20px;
    margin-bottom: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.artist-content .song-item:hover,
#album-detail-view .song-item:hover {
    transform: scale(1.01) translateY(-2px) !important;
}

#artists-grid,
#artist-albums-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr) !important;
    grid-template-rows: repeat(4, min-content) !important;
    gap: 25px 10px !important;
    align-content: start !important;
    width: 100%;
    min-height: 0;
    padding-bottom: 20px;
}

#artists-grid .tile,
#artist-albums-grid .tile {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 1;
}

#artist-albums-grid .tile-text {
    bottom: 30px !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

/* Skeleton Screens */
.tile.lazy-loading::before {
    background: linear-gradient(135deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 200%;
    animation: shimmer 1.5s infinite;
}

.tile.loaded::before {
    animation: none;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

.skeleton-artist-tile {
    aspect-ratio: 1;
    border-radius: 12px;
}

.skeleton-artist-banner {
    width: 100%;
    height: 340px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.skeleton-song-item {
    display: grid;
    grid-template-columns: 40px 50px 3fr 2fr 2fr 120px;
    padding: 11px 15px;
    gap: 15px;
    margin-bottom: 4px;
}

.skeleton-song-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.skeleton-line {
    height: 16px;
    border-radius: 4px;
}

.skeleton-line.short {
    width: 40%;
}

.skeleton-line.medium {
    width: 60%;
}

.skeleton-line.long {
    width: 80%;
}

.radio-program-item.skeleton-item {
    cursor: default;
}

.radio-program-item.skeleton-item:hover {
    background: transparent;
    transform: none;
}

.load-more-section {
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
}

.load-more-btn {
    padding: 10px 30px;
    border-radius: 25px;
    background: var(--c-active-bg);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s var(--ease-out);
}

.load-more-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Toplist Overrides */
#toplist-grid .tile-text {
    display: none !important;
}

#toplist-grid .tile::after {
    display: none !important;
}

/* View Specific General Styles */
#view-discover .song-item {
    padding: 8.5px 15px;
    margin-bottom: 1px;
}

#view-toplist .song-item {
    padding: 9px 15px;
    margin-bottom: 2px;
}

#view-fav .song-item,
#view-playlists .song-item,
#view-detail .song-item,
#view-history .song-item {
    padding: 11px 15px;
    margin-bottom: 4px;
}

/* Responsive Views */
@media (max-width: 1400px) {
    #radio-category-detail-view>div:not(.detail-back-btn):not(.list-header) {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    #category-featured-radios {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
    }
}

@media (max-width: 1200px) {
    .radio-content-split {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}