body.is-mobile {
    background: #0b0b0b;
    color: #e5e7eb;
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

:root {
    --mx-safe-bottom: clamp(0px, env(safe-area-inset-bottom), 16px);
    --mx-tabbar-h: 62px;
    --mx-player-h: 82px;
}

body.is-mobile .main {
    padding-top: calc(56px + env(safe-area-inset-top));
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
}

body.is-mobile .container,
body.is-mobile .home-page .container {
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
}

.m-app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    padding: 0 14px;
    padding-top: env(safe-area-inset-top);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(6, 6, 10, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    z-index: 1000;
}

.m-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e5e7eb;
    text-decoration: none;
    font-weight: 700;
}

.m-logo-image {
    height: 28px;
}

.m-logo-mark {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

.m-logo-svg {
    width: 28px;
    height: 28px;
    display: block;
}

.m-logo-text {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.m-app-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.m-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
    text-decoration: none;
}

.m-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #22c55e;
    color: #0b0b0b;
    font-size: 11px;
    line-height: 16px;
    text-align: center;
}

.m-tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 62px;
    padding-bottom: env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(6, 6, 10, 0.95);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    z-index: 1305;
}

/* 移动端播放器：恢复横向一行布局，仅做位置和尺寸适配 */
@media (max-width: 1024px) {
    body.mobile-app #global-player {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: calc(var(--mx-tabbar-h) + var(--mx-safe-bottom)) !important;
        width: 100% !important;
        height: 82px !important;
        min-height: 82px !important;
        z-index: 1200 !important;
    }

    body.mobile-app #global-player.hidden {
        transform: translateY(100%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    body.mobile-app #global-player .player-content {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        height: 82px !important;
        padding: 0 10px !important;
        gap: 8px !important;
    }

    body.mobile-app #global-player .track-info {
        width: auto !important;
        min-width: 120px !important;
        max-width: 44% !important;
        height: auto !important;
        gap: 8px !important;
    }

    body.mobile-app #global-player .track-details {
        width: auto !important;
        max-width: none !important;
    }

    body.mobile-app #global-player .player-waveform-main {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        height: 40px !important;
    }

    body.mobile-app #global-player .player-controls-group {
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        gap: 4px !important;
    }

    body.mobile-app:not(.player-hidden) .main {
        padding-bottom: calc(var(--mx-tabbar-h) + 82px + var(--mx-safe-bottom) + 12px) !important;
    }
}

.m-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #9ca3af;
    font-size: 11px;
    text-decoration: none;
}

.m-tab-item i {
    font-size: 16px;
}

.m-tab-item.active {
    color: #22c55e;
}

body.is-mobile .hero-banner {
    border-radius: 0;
}

body.is-mobile .slide-content {
    flex-direction: column;
    gap: 18px;
}

body.is-mobile .slide-left,
body.is-mobile .slide-right {
    width: 100%;
}

body.is-mobile .slide-actions {
    flex-direction: column;
    align-items: stretch;
}

body.is-mobile .slide-actions .btn {
    width: 100%;
    justify-content: center;
}

body.is-mobile .featured-track-card {
    width: 100%;
}

body.is-mobile .feature-grid,
body.is-mobile .track-grid,
body.is-mobile .release-grid,
body.is-mobile .charts-grid,
body.is-mobile .labels-grid,
body.is-mobile .artists-grid,
body.is-mobile .genre-grid,
body.is-mobile .album-grid {
    grid-template-columns: 1fr !important;
    gap: 14px;
}

body.is-mobile .sidebar-filters,
body.is-mobile .genre-filters {
    display: none !important;
}

body.is-mobile .section {
    padding-top: 18px;
    padding-bottom: 18px;
}

body.is-mobile .global-player {
    bottom: calc(var(--mx-tabbar-h) + var(--mx-safe-bottom));
}

body.is-mobile #global-player {
    border-radius: 12px 12px 0 0;
}

body.is-mobile .footer,
body.is-mobile .site-footer {
    display: none;
}

