/* ==============================
   Base Reset & Body
   ============================== */

@font-face {
    font-family: 'malawian';
    src: url('CharterRegular.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    min-height: 100vh;
    font-family: sans-serif;
    margin: 0;
    overflow: hidden;
}

/* ==============================
   Canvas (dark inset container)
   ============================== */

.canvas {
    background-color: #2d2d2d;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.3);
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    bottom: 50px;
    display: flex;
    flex-direction: column;
}

/* ==============================
   Nav Area
   ============================== */

.nav-area {
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    gap: 24px;
    position: relative;
    z-index: 10;
}

.nav-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    width: 100%;
}

.nav-logo {
    height: 30px;
    margin-right: 12px;
    cursor: pointer;
}

.nav-area a {
    color: #999;
    text-decoration: none;
    font-family: sans-serif;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-area a:hover,
.nav-area a.active {
    color: #fff;
}

.nav-links {
    display: contents;
}

/* ==============================
   User Auth Section (in nav)
   ============================== */

.user-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    white-space: nowrap;
}

.user-auth a {
    color: #999;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.user-auth a:hover {
    color: #fff;
}

.user-auth .user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 13px;
    color: #ccc;
}

.user-auth .user-info .user-name {
    color: #ddd;
    font-size: 13px;
}

.user-auth .user-info .user-meta {
    font-size: 11px;
    color: #888;
}

.user-auth .user-info .user-meta a {
    color: #888;
    font-size: 11px;
}

.user-auth .user-info .user-meta a:hover {
    color: #fff;
}

.user-auth .user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.fullscreen-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    margin-left: 8px;
}

.fullscreen-btn:hover {
    color: #fff;
}

/* Fullscreen mode — remove margins, overlay footer */
body.fs-mode {
    background-color: #2d2d2d;
}

body.fs-mode .canvas {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: none;
}

body.fs-mode .footer {
    left: 0;
    right: 0;
    background: rgba(45, 45, 45, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10;
}

/* ==============================
   Search Icon & Search Bar
   ============================== */

.search-icon {
    margin-left: 12px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    flex-shrink: 0;
}

.search-icon:hover {
    color: #fff;
}

.search-bar {
    display: none;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-bar.open {
    display: flex;
    justify-content: center;
}

.search-bar form {
    display: flex;
    width: 350px;
}

.search-bar input {
    width: 100%;
    padding: 10px 14px;
    background: #222;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-family: sans-serif;
    font-size: 14px;
    outline: none;
}

.search-bar input::placeholder {
    color: #666;
}

.search-bar input:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

.search-bar .btn-search {
    padding: 10px 16px;
    background: #444;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    color: #ccc;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-bar .btn-search:hover {
    background: #555;
}


/* ==============================
   Mobile Menu
   ============================== */

.menu-toggle {
    display: none;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    flex-shrink: 0;
}

.menu-toggle:hover {
    color: #fff;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 12px 20px;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu.open {
    display: flex;
}

.mobile-menu a {
    color: #999;
    text-decoration: none;
    font-family: sans-serif;
    font-size: 14px;
    padding: 8px 0;
    transition: color 0.2s;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: #fff;
}

.mobile-menu .mobile-sub-label {
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 8px;
    padding-bottom: 0;
}

.mobile-menu .mobile-sub-link {
    padding-left: 12px;
    font-size: 13px;
}

/* ==============================
   Content Area (white bg for child templates)
   ============================== */

.content-area {
    flex: 1;
    overflow-y: auto;
    background-color: #2d2d2d;
    color: #ddd;
    position: relative;
    z-index: 1;
}

/* ==============================
   Card Grid (from newLook.html)
   ============================== */

.music-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-auto-rows: min-content;
    gap: 24px;
    padding: 10px 0 20px;
}

.music-card {
    width: 100%;
    aspect-ratio: 1;
    position: relative;
    transition: box-shadow 0.3s;
    cursor: pointer;
    overflow: hidden;
    outline: 1px solid rgba(255, 255, 255, 0.12);
}

.music-card:hover {
    box-shadow: 0 0 20px rgba(0, 200, 80, 0.5);
}

.music-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    filter: saturate(0.4);
    transition: filter 0.3s;
}

.music-card:hover img {
    filter: saturate(1.2);
}

.music-card-stats {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 6px;
}

.music-card-stat {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-family: sans-serif;
    font-size: 11px;
    padding: 3px 7px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.music-card-stat svg {
    width: 12px;
    height: 12px;
}

.music-card-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.music-card-title {
    color: #fff;
    background: #000;
    font-family: sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 8px;
    border-top: 1px solid #fff;
    border-left: 1px solid #fff;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-card-artist {
    color: #222;
    background: #fff;
    font-family: sans-serif;
    font-size: 14px;
    margin-top: -6px;
    padding: 3px 8px;
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Now-playing card highlight */
.music-card.now-playing {
    outline: 2px solid #4caf50;
}

.music-card.now-playing img {
    filter: saturate(1);
}

.music-card.now-playing .music-card-artist {
    background: orangered;
    color: #fff;
}

/* ==============================
   Footer
   ============================== */

.footer {
    position: absolute;
    bottom: 0;
    left: 40px;
    right: 40px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 24px;
    font-family: sans-serif;
    font-size: 13px;
    color: #999;
}

.footer a {
    color: #999;
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: #333;
}

.footer-links {
    display: flex;
    gap: 20px;
}

/* ==============================
   Utility Classes (used by child templates)
   ============================== */

.flex-div {
    display: flex;
}

.cover-image {
    background-position: center;
    background-size: cover;
    margin-top: 5px;
}

.contain-image {
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    margin-top: 5px;
}

.faint-hr {
    border-color: rgba(255, 255, 255, 0.1);
    border-style: solid;
    margin-top: 4px;
    margin-bottom: 4px;
}

.song-details {
    padding-left: 10px;
    margin-top: 5px;
    width: calc(100% - 50px);
    color: #0153b1;
    font-size: 13px;
}

.song-art {
    width: 50px;
    height: 50px;
    border-radius: 20px;
}

.song_link {
    width: calc(100% - 30px);
    text-decoration: none;
    cursor: pointer;
}

.action-box {
    width: 30px;
    margin-top: 6px;
}

.main_content_container {
    padding: 20px;
}

.picture_icon {
    margin-bottom: 20px;
    border-radius: 1px;
    width: 260px;
    height: 250px;
    min-width: 250px;
    margin-left: 20px;
}

.song_number {
    padding-left: 10px;
    padding-right: 10px;
    width: 30px;
    color: darkgray;
}

.song_number_active {
    padding-left: 10px;
    padding-right: 10px;
    width: 30px;
    color: orangered;
}

.rank {
    width: 20px;
    margin-top: 10px;
    font-weight: bold;
}

.audio_player_simple {
    width: 100%;
    padding: 0%;
    margin: 0%;
    height: 20px;
    padding-bottom: 20px;
}

.play-pause-player {
    width: 40px;
    height: 40px;
    padding-right: 10px;
    cursor: pointer;
}

.download-player {
    height: auto;
    width: 100px;
}

.audio-controls-mobile {
    width: 100%;
    margin-left: -10px;
}

.flexer-player {
    width: calc(100% - 40px - 100px - 100px);
}

.time-player {
    width: 100px;
    text-align: right;
    font-size: larger;
    padding-top: 5px;
}

.song-item-control {
    width: 20px;
    height: 20px;
}

/* ==============================
   Charts Page
   ============================== */

.charts-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
}

.charts-content.no-tabs {
    padding-top: 0;
}

.chart-tabs {
    display: flex;
    justify-content: flex-end;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-tab {
    padding: 10px 24px;
    color: #777;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    user-select: none;
}

.chart-tab:hover {
    color: #ccc;
}

.chart-tab.active {
    color: #fff;
    border-bottom-color: #fff;
}

.chart-tab .tab-count {
    color: #555;
    font-size: 11px;
    margin-left: 6px;
}

.chart-tab.active .tab-count {
    color: #888;
}

.chart-section {
    display: none;
}

.chart-section.active {
    display: flex;
    gap: 32px;
}

.chart-featured {
    width: 50%;
    flex-shrink: 0;
    align-self: stretch;
    overflow: visible;
}

.chart-featured.third {
    width: 33.333%;
}

.chart-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.5);
    transition: filter 0.4s;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 15%, #000 50%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 15%, #000 50%, transparent 100%);
}

.chart-featured:hover img {
    filter: saturate(1.1);
}

.chart-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.chart-list.two-col {
    display: block;
    columns: 2;
    column-gap: 32px;
}

.chart-list.two-col .chart-row {
    break-inside: avoid;
}

.chart-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
}

.chart-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.chart-row:hover .chart-art img {
    filter: saturate(1.2);
}

.chart-rank {
    width: 24px;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    flex-shrink: 0;
}

.chart-rank.gold { color: #d4af37; }
.chart-rank.silver { color: #c0c0c0; }
.chart-rank.bronze { color: #b87333; }

.chart-trend {
    width: 18px;
    flex-shrink: 0;
    text-align: center;
    font-size: 8px;
    margin-right: 2px;
}

.chart-trend.up { color: #4caf50; }
.chart-trend.down { color: #e53935; }
.chart-trend.same { color: #555; font-size: 11px; }
.chart-trend.new-entry { color: #2196f3; font-size: 7px; font-weight: 600; }

.chart-art {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    margin-right: 12px;
    overflow: hidden;
    outline: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.4);
    transition: filter 0.3s;
}

.chart-info {
    flex: 1;
    min-width: 0;
}

.chart-title {
    color: #eee;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-artist {
    color: #777;
    font-size: 11px;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chart-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    flex-shrink: 0;
    margin-left: 12px;
    padding-right: 5px;
}

.chart-stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 10px;
}

.chart-stat-item svg {
    width: 10px;
    height: 10px;
}

.featured-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.featured-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.featured-heading {
    color: #999;
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
}

.chart-pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 24px 0;
    flex-wrap: wrap;
}

.chart-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 13px;
    color: #999;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.chart-page-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.chart-page-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-weight: 600;
}

/* ==============================
   Mobile Responsive
   ============================== */

@media (max-width: 768px) {
    .canvas {
        top: 0;
        left: 0;
        right: 0;
        bottom: 60px;
        box-shadow: none;
    }

    .footer {
        left: 0;
        right: 0;
        height: 60px;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        padding: 0 16px;
        background: #fff;
    }

    body {
        background-color: #2d2d2d;
    }

    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .nav-inner {
        width: 100%;
        justify-content: space-between;
    }

    .nav-inner .search-icon {
        margin-left: auto;
    }

    .user-auth {
        display: none;
    }

    .search-bar form {
        width: 100%;
    }

    .music-card-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
        padding: 10px 12px 12px;
    }

    /* Charts mobile */
    .canvas.charts-page {
        bottom: 50px;
    }

    .charts-content {
        padding: 16px 12px;
        padding-bottom: 0;
    }

    .charts-content.no-tabs {
        padding-top: 0;
    }

    .chart-tabs {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        justify-content: center;
        background: #1a1a1a;
        margin-bottom: 0;
        border-bottom: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        z-index: 100;
        height: 50px;
        align-items: center;
    }

    .chart-tab {
        padding: 10px 14px;
        font-size: 12px;
    }

    .chart-tab .tab-count {
        display: none;
    }

    .chart-section.active {
        flex-direction: column;
        gap: 0;
    }

    .chart-featured,
    .chart-featured.third {
        display: none;
    }

    .chart-list.two-col {
        columns: 1;
    }

    .chart-stats {
        display: none;
    }

    .newPlayer {
        display: none !important;
    }
}

/* ==============================
   Mobile Full-Screen Player
   ============================== */

.mobile-player {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    flex-direction: column;
    justify-content: space-between;
    font-family: sans-serif;
    overflow: hidden;
}

.mobile-player.active {
    display: flex;
}

/* Blurred background image */
.mp-bg {
    position: absolute;
    inset: -40px;
    z-index: 0;
}

.mp-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(40px) brightness(0.4);
    transform: scale(1.1);
}

/* Top info section — lighter blur */
.mp-top {
    position: relative;
    z-index: 1;
    padding: 20px 24px 16px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
}

.mp-close {
    position: absolute;
    top: 16px;
    left: 16px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.2s;
}

.mp-close:hover {
    color: #fff;
}

.mp-title {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-top: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-artist {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Center artwork */
.mp-artwork {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    padding: 24px;
}

.mp-artwork img {
    width: 65vw;
    height: 65vw;
    max-width: 320px;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* Waveform progress section */
.mp-progress {
    position: relative;
    z-index: 1;
    padding: 0 24px 8px;
}

.mp-waveform {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 40px;
    cursor: pointer;
}

.mp-waveform .mp-bar {
    flex: 1;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    transition: background 0.15s;
}

.mp-waveform .mp-bar.played {
    background: #fff;
}

.mp-times {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 6px;
}

/* Bottom controls — heavier/darker blur */
.mp-controls {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 20px 24px 40px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.mp-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s;
}

.mp-btn:hover {
    opacity: 0.8;
}

.mp-prev,
.mp-next {
    width: 40px;
    height: 40px;
}

.mp-play {
    width: 64px;
    height: 64px;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 50%;
}

/* Hide player on desktop */
@media (min-width: 769px) {
    .mobile-player {
        display: none !important;
    }
}

/* Song page: let canvas blur show through */
.song-page-active .content-area {
    background-color: transparent;
}

.song-page-active::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--song-bg) center/cover no-repeat;
    filter: blur(60px) brightness(0.3);
    z-index: 0;
    pointer-events: none;
}

/* ==============================
   Song Detail Page
   ============================== */

.song-page {
    position: relative;
    min-height: 100%;
}

.song-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--song-bg) center/cover no-repeat;
    filter: blur(60px) brightness(0.3);
    z-index: 0;
    pointer-events: none;
}

.song-page > * {
    position: relative;
    z-index: 1;
}

.song-desktop {
    padding: 20px;
}

.song-hero {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.song-hero-art {
    width: 280px;
    height: 280px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 2px;
}

.song-hero-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.song-hero-info {
    flex: 0;
}

.song-hero-title {
    color: #fff;
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 8px;
}

.song-hero-title .song-album {
    color: rgba(255, 255, 255, 0.5);
    font-size: 20px;
    font-weight: 400;
}

.song-hero-title .song-sep {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.song-hero-artist {
    color: #fff;
    font-size: 16px;
    text-decoration: none;
    cursor: pointer;
}

.song-hero-stats {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

.song-hero-stats span {
    color: #e53935;
}

.song-download-btn {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.song-download-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Desktop waveform player */
.desktop-player {
    background: transparent;
    margin-top: auto;
}

.desktop-player .dp-waveform {
    height: 50px;
    background: transparent;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
}

.desktop-player .dp-waveform .dp-bar {
    flex: 1;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    transition: background 0.15s;
    transform-origin: bottom;
}

.desktop-player .dp-waveform .dp-bar.played {
    background: #fff;
}

.desktop-player .dp-waveform.playing .dp-bar {
    animation: barPulse 0.6s ease-in-out infinite alternate;
}

@keyframes barPulse {
    0%   { transform: scaleY(1); }
    100% { transform: scaleY(var(--pulse-to, 0.7)); }
}

.desktop-player .dp-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px;
}

.desktop-player .dp-play-btn {
    width: 36px;
    height: 36px;
    cursor: pointer;
    background: none;
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.desktop-player .dp-times {
    display: flex;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.desktop-player .dp-times span:first-child {
    color: #fff;
}

/* Desktop two-column layout: left (hero+album) / right (lyrics) */
.song-body {
    display: flex;
    gap: 24px;
}

.song-body-left {
    flex: 1;
    min-width: 0;
}

.song-body-right {
    width: 280px;
    flex-shrink: 0;
}

/* Lyrics panel */
.lyrics-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    padding: 16px;
    font-size: 13px;
    color: #bbb;
    line-height: 1.8;
    max-height: 500px;
    overflow-y: auto;
}

.lyrics-panel .lyrics-label {
    color: #888;
    font-size: 12px;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-lyrics {
    display: none;
}

/* Song mobile inline player */
.mp-hero {
    display: none;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.mp-page-bg {
    display: none;
    position: absolute;
    inset: -40px;
    z-index: 0;
}

.mp-page-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(40px) brightness(0.4);
    transform: scale(1.1);
}

.mp-hero-top {
    position: relative;
    z-index: 1;
    padding: 16px 20px 12px;
    text-align: center;
}

.mp-hero-title {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mp-hero-artist-name {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-top: 3px;
}

.mp-hero-artwork {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 20px 24px;
}

.mp-hero-artwork img {
    width: 55vw;
    height: 55vw;
    max-width: 260px;
    max-height: 260px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.mp-hero-progress {
    position: relative;
    z-index: 1;
    padding: 0 20px 6px;
}

.mp-hero-waveform {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    height: 36px;
    cursor: pointer;
}

.mp-hero-waveform .mp-bar {
    flex: 1;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.3);
    transition: background 0.15s;
    transform-origin: bottom;
}

.mp-hero-waveform .mp-bar.played {
    background: #fff;
}

.mp-hero-waveform.playing .mp-bar {
    animation: barPulse 0.6s ease-in-out infinite alternate;
}

.mp-hero-times {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    margin-top: 4px;
}

.mp-hero-controls {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    padding: 14px 20px 10px;
}

.mp-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 14px;
}

.mp-stats {
    display: flex;
    gap: 14px;
}

.mp-stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

.mp-stat svg {
    width: 14px;
    height: 14px;
}

.mp-download {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    width: fit-content;
}

.mp-download:hover {
    background: rgba(255, 255, 255, 0.22);
}

.mp-download svg {
    width: 16px;
    height: 16px;
}

.mp-hero-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s;
}

.mp-hero-btn:hover { opacity: 0.8; }

.mp-hero-btn-prev,
.mp-hero-btn-next {
    width: 36px;
    height: 36px;
}

.mp-hero-btn-play {
    width: 56px;
    height: 56px;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
}

/* Hide mobile-only song elements on desktop */
.mp-lower,
.mobile-content {
    display: none;
}

/* Song page mobile overrides */
@media (max-width: 768px) {
    .song-page .mp-page-bg {
        display: block;
        position: fixed;
        inset: -40px;
        z-index: 0;
    }

    .mp-hero {
        display: flex;
        position: relative;
        z-index: 1;
    }

    .song-desktop { display: none; }

    .mp-lower {
        display: block;
        position: relative;
        z-index: 1;
        background: rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
    }

    .mobile-content {
        display: block;
        position: relative;
        z-index: 1;
        padding: 16px 14px 24px;
    }

    .mobile-content .section-title {
        margin-top: 0;
    }

    .mobile-lyrics {
        display: block;
        padding: 0 14px 16px;
    }

    .mobile-lyrics .lyrics-panel {
        max-height: 200px;
    }

    .song-body-right {
        display: none;
    }
}
