/* --- MP3s Page Container --- */
.song-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
}

.song-header {
    background-color: var(--nav-btn-bg, #3060FF);
    color: white;
    padding: 12px 18px;
    border-radius: 24px;
    margin: 12px auto 24px auto;
    width: calc(100% - 12px);
    box-sizing: border-box;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.song-header h1 {
    margin: 0;
    font-size: 17px;
    font-weight: 500;
}

/* Custom Dropdown */
.song-sort-dropdown {
    position: relative;
    display: inline-block;
}

.sort-toggle-btn {
    background-color: #ffffff;
    color: var(--nav-text, #606468);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 138px;
    justify-content: space-between;
}

.sort-toggle-btn i, .sort-toggle-btn svg {
    width: 16px;
    height: 16px;
}

.randomize-btn {
    background-color: #ffffff;
    color: var(--nav-text, #606468);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.randomize-btn i, .randomize-btn svg {
    width: 16px;
    height: 16px;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.randomize-icon.spinning {
    animation: spin 1s linear infinite;
}

.sort-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 160px;
    z-index: 1010;
    background-color: var(--nav-bg, #ffffff);
    border-radius: 30px;
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.1);
    /* Animation defaults */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top right;
    transition: opacity 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), 
                transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), 
                visibility 0.3s ease;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.sort-chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sort-toggle-btn.active .sort-chevron {
    transform: rotate(-90deg);
}

.sort-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.sort-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--nav-text, #606468);
    text-decoration: none;
    font-weight: 450;
    font-size: 15px;
    border-radius: 40px;
    transition: background-color 0.2s ease, color 0.2s ease;
    margin-bottom: 4px;
}

.sort-menu a i,
.sort-menu a svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2px;
    flex-shrink: 0;
}

.sort-menu a:last-child {
    margin-bottom: 0;
}

.sort-menu a:hover {
    background-color: var(--nav-item-hover, #F7F7F7);
}

.sort-menu a.active {
    background-color: var(--nav-active-bg, #E1E8FA);
    color: var(--nav-active-text, #3060FF);
}

/* Grid layout for MP3s list */
.song-list-wrapper {
    background-color: var(--nav-bg, #ffffff);
    border-radius: 30px;
    box-shadow: 0px 4px 12px rgba(0,0,0,0.05);
    padding: 16px;
    margin: 0 auto;
    width: calc(100% - 12px);
    box-sizing: border-box;
}

.song-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

@media (min-width: 900px) {
    .song-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Item style - similar to release-item from index.css */
.song-item {
    background-color: rgb(247 247 247);
    border-radius: 20px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.song-img-wrapper {
    width: 140px;
    height: 78px;
    border-radius: 12px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.song-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.song-info {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 8px;
}

.song-info h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #4a4a4a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.song-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.song-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #ffffff;
    color: #4a4a4a;
    border-radius: 16px;
    padding: 3px 12px 3px 4px;
    font-size: 12px;
    font-weight: 500;
    width: max-content;
    box-shadow: 0px 1px 3px rgba(0,0,0,0.08);
}

.song-badge i, .song-badge svg {
    width: 12px;
    height: 12px;
}


