/* =========================================================
   DESKTOP UI — separate editable styles
   Breakpoint: desktop/fine pointer, обычно от 1025px и выше.
   Править desktop-интерфейс здесь.
   Tablet: css/tablet.css | Mobile: css/mobile.css
========================================================= */

/* ===== CANVAS ВИЗУАЛИЗАТОР ===== */
.visualizer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    height: 55vh !important;
    z-index: 0 !important;
    pointer-events: none !important;
    display: block !important;
    filter: none !important;
    opacity: 1 !important;
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

/* ===== ОПТИМАЛЬНЫЙ ФОН ПОД CANVAS-ВИЗУАЛИЗАТОР ===== */
body {
    background: radial-gradient(ellipse 140% 100% at 50% 0%, #13131c 0%, #0a0a12 35%, #06060a 100%) !important;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

/* Убираем grid-паттерн — мешает чистоте фона */
body::before {
    display: none !important;
}

.app {
    background: transparent !important;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Убираем размытую фоновую обложку — Canvas-визуализатор сам по себе декоративный элемент */
.player-cover-image {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Предотвращаем горизонтальную прокрутку на всех устройствах */
.player,
.player-wrapper,
.player-cover,
.player-artwork-wrapper,
.player-artwork {
    max-width: 100%;
    overflow-x: hidden;
}

.player-controller {
    overflow: hidden;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ===== КРУГЛЫЕ ВЫПУКЛЫЕ КНОПКИ (Volume & Bitrate) ===== */
.player-button-volume-toggle,
.player-button-lyrics {
    border-radius: 50% !important;
    background-color: var(--accent, var(--bg-transparent)) !important;
    box-shadow:
        0 4px 10px rgba(0,0,0,0.35),
        0 0 0 2px rgba(255,255,255,0.22) !important;
    transition: all 0.2s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    aspect-ratio: 1/1 !important;
    overflow: hidden !important;
}

.player-button-volume-toggle .i,
.player-button-lyrics .i,
.player-button-lyrics img {
    width: 52% !important;
    height: 52% !important;
    stroke: #fff !important;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)) !important;
}

.player-button-volume-toggle:hover,
.player-button-lyrics:hover {
    transform: translateY(-2px) scale(1.05) !important;
    background-color: var(--accent, var(--bg-transparent)) !important;
    box-shadow:
        0 6px 16px rgba(0,0,0,0.4),
        0 0 0 2px rgba(255,255,255,0.32),
        0 0 22px rgba(255,255,255,0.08) !important;
}

.player-button-volume-toggle:active,
.player-button-lyrics:active {
    transform: scale(0.95) !important;
    box-shadow:
        0 2px 5px rgba(0,0,0,0.3),
        0 0 0 2px rgba(255,255,255,0.22) !important;
}

/* Размеры относительно Play (меньше на ~25-30%) */
.player-button-volume-toggle,
.player-button-lyrics {
    min-width: clamp(38px, 4.5vw, 52px) !important;
    min-height: clamp(38px, 4.5vw, 52px) !important;
    width: clamp(38px, 4.5vw, 52px) !important;
    height: clamp(38px, 4.5vw, 52px) !important;
}

/* Десктоп */
@media (min-width: 992px) {
    .player-button-volume-toggle,
    .player-button-lyrics {
        min-width: clamp(42px, 4.5vw, 56px) !important;
        min-height: clamp(42px, 4.5vw, 56px) !important;
        width: clamp(42px, 4.5vw, 56px) !important;
        height: clamp(42px, 4.5vw, 56px) !important;
    }
}
.station-description {
    color: #fff;
    opacity: 0.6;
}

.station-img {
    border: 3px solid #ffffff00;
    padding: 0.15rem;
}

.player-artwork {
    border-radius: 2rem;
    background-color: #ffffff00;
    position: relative;
}

.player-artwork img {
    border-radius: 0.65rem;
    box-shadow: var(--shadow-xl);
}

/* ===== ТЕКСТ И ТИПОГРАФИЯ ===== */
.song-name, .song-artist {
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
    display: block;
    position: relative;
    text-shadow:
        0 1px 3px rgba(0, 0, 0, 0.9),
        0 2px 8px rgba(0, 0, 0, 0.6) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.song-name {
    color: #fff !important;
    font-size: clamp(1.125rem, 4vw, 2rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.95),
        0 2px 10px rgba(0, 0, 0, 0.7) !important;
}

.song-artist {
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: clamp(0.875rem, 3vw, 1.25rem);
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.95),
        0 2px 8px rgba(0, 0, 0, 0.7) !important;
}

/* ===== КНОПКИ УПРАВЛЕНИЯ ===== */
.player-button {
    filter: brightness(1.2) contrast(0.9);
    opacity: 0.95;
    transition: all 0.3s ease;
    color: rgba(255, 255, 255, 0.75);
}

.player-button:hover {
    filter: brightness(1.5) contrast(1);
    opacity: 1;
    color: #fff;
}

.player-button:active {
    transform: scale(0.92);
    transition: transform 0.1s ease;
}

/* Стили для кнопки Play/Pause */
.player-button-play {
    padding: 1rem;
    border-radius: 999px;
    transition: all 0.3s ease;
    background-color: var(--accent, var(--bg-transparent));
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    min-height: 70px;
}

.player-button-play .i {
    width: 32px;
    height: 32px;
    stroke: rgba(255, 255, 255, 0.95) !important;
    stroke-width: 2.2px;
    filter: 
        drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4))
        drop-shadow(0 0 15px rgba(255, 107, 53, 0.3));
}

.player-button-pause .i {
    stroke: rgba(255, 255, 255, 0.95) !important;
    stroke-width: 2.2px;
    filter: 
        drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4))
        drop-shadow(0 0 15px rgba(255, 107, 53, 0.3));
}

/* Кнопка переключения потоков */
.player-button-lyrics {
    transition: all 0.3s ease;
    position: relative;
}

.player-button-lyrics.stream-secondary {
    background-color: var(--color-primary, #007bff);
    color: white;
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
}

.player-button-lyrics.stream-secondary::after {
    content: "ALT";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4757;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 8px;
    line-height: 1;
}

.player-button-lyrics .i,
.player-button-volume-toggle .i {
    width: 28px;
    height: 28px;
    stroke: rgba(255, 255, 255, 0.95) !important;
    stroke-width: 1.8px;
    fill: none;
}

/* ===== КАЧЕСТВО ПОТОКА ===== */
.player-program {
    background-image: none;
}

.player-program-time-container {
    position: absolute;
    left: clamp(12px, 3vw, 20px);
    bottom: clamp(8px, 2vw, 12px);
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.player-program-badge {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: clamp(4px, 1vw, 6px) clamp(10px, 2vw, 14px);
    border-radius: 8px;
    font-size: clamp(0.65rem, 2vw, 0.8rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.25);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* ===== СОЦИАЛЬНЫЕ ИКОНКИ ===== */
.player-social-item {
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    border-radius: 50%;
    padding: 8px;
    transition: all 0.3s ease;
    opacity: 0;
    animation: socialItemAppear 0.5s ease forwards;
}

.player-social-item::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transition: all 0.3s ease;
}

.player-social-item:hover {
    transform: scale(1.1);
    border: 3px solid rgba(255, 255, 255, 1) !important;
    padding: 7px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    filter: drop-shadow(0 0px 15px rgba(255, 255, 255, 0.8)) 
            drop-shadow(0 0px 25px rgba(255, 255, 255, 0.6)) 
            drop-shadow(0 0px 35px rgba(255, 255, 255, 0.4)) !important;
}

.player-social-item:hover::before {
    border: 2px solid rgba(255, 255, 255, 1);
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(255, 255, 255, 0.5);
}

.player-social-item .i {
    stroke: rgba(255, 255, 255, 0.9) !important;
    stroke-width: 2px !important;
}

@keyframes socialItemAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.player-social-item:nth-child(1) { animation-delay: 0.1s; }
.player-social-item:nth-child(2) { animation-delay: 0.2s; }
.player-social-item:nth-child(3) { animation-delay: 0.3s; }
.player-social-item:nth-child(4) { animation-delay: 0.4s; }

/* ===== КНОПКИ ШАПКИ ===== */
.about-button, 
#history-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.7),
        0 0 15px rgba(51, 153, 255, 0.6) !important;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(15px) !important;
}

.about-button::before,
#history-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg, 
        rgba(0, 0, 0, 0.85) 0%, 
        rgba(0, 0, 0, 0.75) 50%, 
        rgba(0, 0, 0, 0.85) 100%
    );
    backdrop-filter: blur(10px);
    border-radius: inherit;
    z-index: -1;
    transition: all 0.3s ease;
}

.about-button:hover,
#history-button:hover {
    transform: translateY(-2px) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 
        0 6px 20px rgba(51, 153, 255, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    color: #ffffff!important;
}

.about-button:hover::before,
#history-button:hover::before {
    background: linear-gradient(
        135deg, 
        rgba(0, 0, 0, 0.95) 0%, 
        rgba(0, 0, 0, 0.85) 50%, 
        rgba(0, 0, 0, 0.95) 100%
    );
    backdrop-filter: blur(15px);
}

.about-button .i,
#history-button .i {
    stroke: white !important;
    stroke-width: 2.5px !important;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5)) !important;
}

#history-button {
    text-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.7),
        0 0 15px rgba(255, 51, 51, 0.6) !important;
}

#history-button:hover {
    box-shadow: 
        0 6px 20px rgba(255, 51, 51, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

/* ===== МОБИЛЬНЫЕ ИКОНКИ ===== */
.mobile-icon-button {
    --btn-fs: 0 !important;
    --btn-gap: 0 !important;
    --i-size: 20px !important;
    width: 44px !important;
    height: 44px !important;
    padding: 10px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(15px) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: 0 !important;
    position: relative;
    isolation: isolate;
}

.mobile-icon-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    border-radius: inherit;
    z-index: -1;
    transition: all 0.3s ease;
}

.mobile-icon-button:hover {
    transform: translateY(-2px) !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2) !important;
}

.mobile-icon-button:hover::before {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
}

.mobile-icon-button .i {
    stroke: white !important;
    stroke-width: 2.5px !important;
}

/* ===== УВЕДОМЛЕНИЯ ===== */
.stream-notification {
    position: fixed;
    top: clamp(70px, 12vh, 120px);
    right: clamp(10px, 3vw, 20px);
    background: rgba(0, 0, 0, 0.55);
    color: white;
    padding: clamp(8px, 2vw, 14px) clamp(12px, 3vw, 18px);
    border-radius: clamp(8px, 2vw, 10px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    z-index: 1000;
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: clamp(200px, 70vw, 260px);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-align: center;
}

.stream-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.stream-notification.hide {
    transform: translateX(400px);
    opacity: 0;
}

.stream-notification-content {
    display: flex;
    align-items: center;
    gap: clamp(6px, 2vw, 10px);
    font-size: clamp(11px, 2.5vw, 13px);
    line-height: 1.3;
}

.stream-notification-icon {
    width: clamp(14px, 3.5vw, 18px);
    height: clamp(14px, 3.5vw, 18px);
    flex-shrink: 0;
}

.stream-notification-text {
    text-align: left;
}

.stream-notification-quality {
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 2px;
    font-size: clamp(9px, 2vw, 11px);
    white-space: nowrap;
}

/* Мобильная адаптация уведомления */
@media (max-width: 480px) {
    .stream-notification {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }

    .stream-notification.show {
        transform: translateY(0);
    }

    .stream-notification.hide {
        transform: translateY(-100px);
    }

    .stream-notification-content {
        justify-content: center;
    }
}

/* ===== АДАПТИВНОСТЬ ===== */
.desktop-only { display: none; }
.mobile-only { display: none; }

@media (min-width: 992px) {
    .desktop-only { display: inline-flex !important; }
    .mobile-only { display: none !important; }
    .mobile-menu-button { display: none !important; }
    
    .player-controller {
        padding-top: 1.5rem;
        gap: 5rem;
    }
    
    .player-button-play {
        min-width: 5vw;
        min-height: 5vw;
        padding: 1vw;
    }
    
    .player-button-play .i {
        width: 2vw;
        height: 2vw;
    }
    
    .about-button.desktop-only,
    #history-button {
        --btn-fs: 0.7vw !important;
        --btn-padding: 0.6vw 1vw !important;
        --i-size: 1vw !important;
        --btn-gap: 0.4vw !important;
        min-height: auto !important;
        border-width: 1.5px !important;
        border-radius: 8px !important;
    }
    
    .toggle-options { gap: 0.8vw !important; }
}

@media (max-width: 991px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: inline-flex !important; }
    .mobile-menu-button { display: inline-flex !important; }

    .header {
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
    }

    .mobile-menu {
        background: rgba(0, 0, 0, 0.55) !important;
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    }

    .player {
        display: flex;
        flex-direction: column;
        padding-top: 80px;
        padding-bottom: 20px;
        height: 100dvh;
        overflow: hidden;
    }

    .player-wrapper {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
        width: 100%;
        margin: 0 !important;
        padding: 0 15px;
        flex: 1;
        min-height: 0;
    }

    .player-cover {
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1;
        min-height: 0;
        gap: clamp(0.5rem, 2vh, 1.5rem);
    }

    .player-artwork-wrapper {
        max-width: min(300px, 65vw, 42vh);
        margin: 0 auto;
        flex-shrink: 1;
    }

    .player-artwork {
        max-width: 100% !important;
        margin: 0 auto;
        margin-bottom: 0;
    }

    .player-controller {
        position: static !important;
        transform: none !important;
        margin-top: 0;
        margin-bottom: clamp(8px, 2vh, 16px);
        gap: clamp(1.5rem, 6vw, 3.5rem) !important;
        padding: clamp(8px, 1.5vh, 16px) clamp(16px, 3vw, 28px) !important;
        width: clamp(260px, 65vw, 420px) !important;
        max-width: 90% !important;
        min-height: clamp(52px, 9vh, 80px);
        background: rgba(0, 0, 0, 0.7) !important;
        backdrop-filter: blur(20px) !important;
        border-radius: clamp(30px, 8vw, 60px) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
        margin-left: auto !important;
        margin-right: auto !important;
        flex-shrink: 0;
    }

    .player-button-backward-step,
    .player-button-forward-step {
        display: none !important;
    }
    
    .player-button-play {
        min-width: clamp(50px, 12vw, 85px) !important;
        min-height: clamp(50px, 12vw, 85px) !important;
        padding: clamp(0.6rem, 2vw, 1.2rem) !important;
    }
    
    .player-button-play .i {
        width: clamp(22px, 5vw, 38px) !important;
        height: clamp(22px, 5vw, 38px) !important;
        stroke-width: clamp(2px, 0.4vw, 2.5px) !important;
        filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4))
                drop-shadow(0 0 clamp(8px, 2vw, 20px) rgba(255, 107, 53, 0.3));
    }
    
    .player-button-volume-toggle,
    .player-button-lyrics {
        --i-size: clamp(20px, 4.5vw, 32px) !important;
        min-width: clamp(40px, 9vw, 65px) !important;
        min-height: clamp(40px, 9vw, 65px) !important;
        display: flex !important;
    }
    
    .player-button .i {
        width: var(--i-size) !important;
        height: var(--i-size) !important;
        stroke-width: clamp(1.8px, 0.3vw, 2.2px) !important;
    }
    
    .player-program-time-container {
        left: 15px;
        bottom: 8px;
    }
    
    .player-program-badge {
        font-size: 0.7rem;
        padding: 3px 10px;
    }

    .player-cover-title {
        max-width: 85vw;
        margin: 0 auto;
        padding: 0 5px;
    }

    .player-wrapper { padding: 0 10px; }
}

@media (max-width: 480px) {
    .player {
        padding-top: 70px;
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }

    .player-cover-title {
        max-width: 95vw;
        margin-top: clamp(4px, 1.5vh, 12px);
        margin-bottom: clamp(4px, 1.5vh, 12px);
    }

    .song-artist {
        font-size: clamp(0.8rem, 3.5vw, 1rem) !important;
    }

    .song-name {
        font-size: clamp(1rem, 4.5vw, 1.3rem) !important;
    }

    .player-artwork-wrapper {
        max-width: min(260px, 68vw, 40vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-controller {
        gap: clamp(1.2rem, 5vw, 2.5rem) !important;
        padding: clamp(6px, 1.5vh, 12px) clamp(12px, 3vw, 22px) !important;
        width: clamp(220px, 72vw, 340px) !important;
        min-height: clamp(48px, 8vh, 70px);
        border-radius: clamp(22px, 6vw, 40px) !important;
        margin-bottom: clamp(4px, 1.5vh, 12px);
        margin-top: 0;
    }
    
    .player-button-play {
        min-width: clamp(45px, 11vw, 70px) !important;
        min-height: clamp(45px, 11vw, 70px) !important;
        padding: clamp(0.5rem, 1.8vw, 1rem) !important;
    }
    
    .player-button-play .i {
        width: clamp(20px, 4.5vw, 30px) !important;
        height: clamp(20px, 4.5vw, 30px) !important;
    }
    
    .player-button-volume-toggle,
    .player-button-lyrics {
        --i-size: clamp(18px, 4vw, 26px) !important;
        min-width: clamp(35px, 8vw, 55px) !important;
        min-height: clamp(35px, 8vw, 55px) !important;
    }
    
    .player-button {
        --i-size: 24px !important;
        min-width: 45px !important;
        min-height: 45px !important;
    }
    
    .header-logo-img { height: 50px !important; }
    
    .mobile-icon-button {
        width: 40px !important;
        height: 40px !important;
        --i-size: 18px !important;
    }
    
    .toggle-options { gap: 10px !important; }
    
    .dropdown {
        width: 180px !important;
        bottom: 90px !important;
    }
    
    .player-program-time-container {
        left: 10px;
        bottom: 5px;
    }
    
    .player-program-badge {
        font-size: 0.65rem;
        padding: 2px 8px;
    }
}

@media (max-width: 360px) {
    .player { padding-top: 60px; }

    .player-cover-title {
        margin-top: clamp(2px, 1vh, 8px);
    }

    .song-artist {
        font-size: clamp(0.75rem, 3vw, 0.9rem) !important;
    }

    .song-name {
        font-size: clamp(0.9rem, 4vw, 1.1rem) !important;
    }

    .player-artwork-wrapper {
        max-width: min(220px, 72vw, 38vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-controller {
        gap: clamp(1rem, 4.5vw, 2rem) !important;
        padding: clamp(5px, 1.2vh, 10px) clamp(10px, 2.5vw, 16px) !important;
        width: clamp(190px, 78vw, 280px) !important;
        min-height: clamp(44px, 7.5vh, 60px);
        border-radius: clamp(18px, 5.5vw, 32px) !important;
        margin-bottom: clamp(4px, 1.5vh, 10px);
    }

    .player-button-play {
        min-width: clamp(40px, 10vw, 60px) !important;
        min-height: clamp(40px, 10vw, 60px) !important;
        padding: clamp(0.4rem, 1.5vw, 0.8rem) !important;
    }

    .player-button-play .i {
        width: clamp(18px, 4vw, 26px) !important;
        height: clamp(18px, 4vw, 26px) !important;
    }

    .player-button-volume-toggle,
    .player-button-lyrics {
        --i-size: clamp(16px, 3.5vw, 22px) !important;
        min-width: clamp(32px, 7vw, 48px) !important;
        min-height: clamp(32px, 7vw, 48px) !important;
    }

    .player-button {
        --i-size: 22px !important;
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .header-logo-img { height: 45px !important; }

    .player-wrapper { margin-bottom: 0 !important; }
}

@media (min-width: 768px) and (max-width: 991px) {
    .player { padding-top: 90px; }

    .player-cover-title {
        margin-top: clamp(10px, 3vh, 20px);
        margin-bottom: clamp(10px, 3vh, 20px);
    }

    .song-artist {
        font-size: clamp(1.1rem, 4.5vw, 1.4rem) !important;
    }

    .song-name {
        font-size: clamp(1.3rem, 5.5vw, 1.8rem) !important;
    }

    .player-artwork-wrapper {
        max-width: min(350px, 65vw, 48vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-controller {
        gap: clamp(2rem, 7vw, 4rem) !important;
        padding: clamp(10px, 2vh, 18px) clamp(20px, 4.5vw, 35px) !important;
        width: clamp(300px, 62vw, 460px) !important;
        min-height: clamp(65px, 10vh, 90px);
        border-radius: clamp(35px, 8vw, 60px) !important;
        margin-bottom: clamp(12px, 3vh, 25px);
    }
    
    .player-button-play {
        min-width: clamp(55px, 13vw, 90px) !important;
        min-height: clamp(55px, 13vw, 90px) !important;
        padding: clamp(0.7rem, 2.2vw, 1.3rem) !important;
    }
    
    .player-button-play .i {
        width: clamp(24px, 5.5vw, 40px) !important;
        height: clamp(24px, 5.5vw, 40px) !important;
    }
    
    .player-button-volume-toggle,
    .player-button-lyrics {
        --i-size: clamp(22px, 5vw, 34px) !important;
        min-width: clamp(42px, 10vw, 70px) !important;
        min-height: clamp(42px, 10vw, 70px) !important;
    }
    
    .player-button {
        --i-size: 30px !important;
        min-width: 55px !important;
        min-height: 55px !important;
    }
    
    .header-logo-img { height: 70px !important; }
    
    .mobile-icon-button {
        width: 48px !important;
        height: 48px !important;
        --i-size: 22px !important;
    }
    
    .toggle-options { gap: 14px !important; }
}

@media (min-width: 768px) and (max-width: 991px) and (orientation: portrait) {
    .player-artwork-wrapper {
        max-width: min(340px, 60vw, 45vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-controller {
        gap: 3rem !important;
        padding: 16px 28px !important;
        margin-top: 0;
        margin-bottom: clamp(10px, 2.5vh, 20px);
    }

    .player-button-play {
        min-width: 70px !important;
        min-height: 70px !important;
        padding: 1rem !important;
    }

    .player-button-play .i {
        width: 32px !important;
        height: 32px !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) and (orientation: landscape) {
    .player {
        padding-top: 60px;
        padding-bottom: 12px;
    }

    .player-cover-title { margin-top: 6px; }

    .player-artwork-wrapper {
        max-width: min(220px, 36vw, 55vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-controller {
        gap: 1.75rem !important;
        padding: 8px 18px !important;
        margin-bottom: 6px;
        margin-top: 0;
    }

    .header-logo-img { height: 56px !important; }

    .mobile-icon-button {
        width: 42px !important;
        height: 42px !important;
    }
}

@media (min-width: 481px) and (max-width: 767px) and (orientation: landscape) {
    .player {
        padding-top: 52px;
        padding-bottom: 10px;
    }

    .player-cover-title {
        margin-top: 2px;
        margin-bottom: 2px;
    }

    .song-artist {
        font-size: clamp(0.75rem, 2.6vw, 0.95rem) !important;
    }

    .song-name {
        font-size: clamp(0.95rem, 3.2vw, 1.15rem) !important;
    }

    .player-artwork-wrapper {
        max-width: min(200px, 32vw, 55vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-controller {
        gap: 1.5rem !important;
        padding: 6px 12px !important;
        margin-bottom: 4px;
        min-height: 48px;
        margin-top: 0;
    }

    .player-button {
        min-width: 40px !important;
        min-height: 40px !important;
    }

    .player-button-play {
        min-width: 42px !important;
        min-height: 42px !important;
    }

    .player-button-play .i {
        width: 20px !important;
        height: 20px !important;
    }

    .player-button-volume-toggle,
    .player-button-lyrics {
        min-width: 36px !important;
        min-height: 36px !important;
        --i-size: 18px !important;
    }

    .header-logo-img { height: 46px !important; }

    .mobile-icon-button {
        width: 38px !important;
        height: 38px !important;
        --i-size: 17px !important;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .player-artwork { max-width: 350px !important; }
}

@media (min-width: 1600px) {
    .about-button.desktop-only,
    #history-button {
        --btn-fs: 0.6vw !important;
        --btn-padding: 0.5vw 0.9vw !important;
        --i-size: 0.9vw !important;
    }
    
    .toggle-options { gap: 0.7vw !important; }
}

@media (max-width: 991px) and (min-aspect-ratio: 18/9) {
    .player-controller {
        gap: clamp(2.5rem, 9vw, 5.5rem) !important;
        padding: clamp(8px, 2vh, 15px) clamp(20px, 5vw, 35px) !important;
        width: clamp(280px, 55vw, 450px) !important;
        min-height: clamp(50px, 8vh, 70px);
    }
}

@media (max-width: 991px) and (max-aspect-ratio: 9/18) {
    .player-controller {
        gap: clamp(1.5rem, 6vw, 2.8rem) !important;
        padding: clamp(8px, 2vh, 15px) clamp(15px, 4vw, 22px) !important;
        width: clamp(230px, 75vw, 350px) !important;
        min-height: clamp(55px, 10vh, 80px);
    }
    
    .player-button-play {
        min-width: clamp(48px, 13vw, 75px) !important;
        min-height: clamp(48px, 13vw, 75px) !important;
    }
}

@media (max-width: 991px) {
    .player-button:active {
        transform: scale(0.92);
        transition: transform 0.1s ease;
    }
    
    .player-button-play:active {
        transform: scale(0.92);
        background-color: rgba(255, 107, 53, 0.3);
    }
    
    .player-button,
    .player-button-play {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }
    
    .player-button {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    .mobile-icon-button {
        width: 44px !important;
        height: 44px !important;
    }
}

.portrait-mode .player-controller { bottom: auto !important; }
.portrait-mode .player-wrapper { margin-bottom: 0 !important; }
.landscape-mode .header-logo-img { height: 50px !important; }
.landscape-mode .player-controller {
    bottom: auto !important;
    padding: 10px 20px !important;
}
.landscape-mode .player-wrapper {
    margin-bottom: 0 !important;
}
.landscape-mode .player-artwork-wrapper {
    max-width: min(260px, 44vw, 55vh);
}

@media (max-width: 991px) and (orientation: landscape) and (max-height: 500px) {
    .header-wrapper {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }

    .player {
        padding-top: 50px !important;
        padding-bottom: 8px !important;
    }

    .player-wrapper {
        padding-left: 8px !important;
        padding-right: 8px !important;
        margin-bottom: 0 !important;
    }

    .player-cover {
        gap: 0.5rem !important;
    }

    .player-artwork-wrapper {
        max-width: min(180px, 28vw, 55vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0 !important;
    }

    .player-cover-title-overlay {
        padding: 2px 0 !important;
        gap: 2px !important;
    }

    .marquee-container {
        min-height: 1.1em;
        margin: 0.1rem 0;
    }

    .song-artist {
        font-size: 0.75rem !important;
    }

    .song-name {
        font-size: 0.95rem !important;
    }

    .player-controller {
        gap: 1.25rem !important;
        padding: 6px 12px !important;
        min-height: 44px !important;
        margin-bottom: 4px !important;
        max-width: 420px !important;
    }

    .player-button,
    .player-button-play,
    .player-button-volume-toggle,
    .player-button-lyrics {
        min-width: 36px !important;
        min-height: 36px !important;
    }

    .player-button-play .i,
    .player-button .i {
        width: 18px !important;
        height: 18px !important;
    }

    .dropdown {
        bottom: 60px !important;
    }
}

@media (min-width: 992px) {
    .song-name {
        font-size: clamp(1.1rem, 2.2vw, 1.55rem) !important;
    }

    .song-artist {
        font-size: clamp(0.9rem, 1.6vw, 1.15rem) !important;
    }
}

.player-artwork img {
    width: 100%;
    height: auto;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(1.2em, 4vw, 1.5em);
    margin: 0.2rem 0;
}

.marquee-text {
    white-space: nowrap;
    display: inline-block;
    transition: color 0.3s ease, text-shadow 0.3s ease;
    text-align: center;
    padding: 0 8px;
    max-width: calc(100% + 16px);
    box-sizing: border-box;
    will-change: transform;
}

.marquee-text.scroll {
    animation-name: marquee;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-fill-mode: both;
}

.marquee-text.scroll:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0%, 12% {
        transform: translateX(0);
    }
    88%, 100% {
        transform: translateX(var(--marquee-distance));
    }
}

@media (min-width: 992px) {
    .player-wrapper {
        padding: clamp(1rem, 3vw, 2rem);
    }

    .player {
        padding: clamp(1rem, 3vw, 2rem);
    }
}

.header-logo-img {
    height: clamp(56px, 13vw, 88px) !important;
    max-height: clamp(56px, 13vw, 88px) !important;
    transition: transform 0.6s ease-in-out;
    filter:
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8))
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6))
        drop-shadow(0 0 20px rgba(255, 255, 255, 0.1));
}

.header-logo-img.rotating {
    animation: logoRotate 2s ease-in-out;
}

@keyframes logoRotate {
    0% { transform: rotate(0deg); }
    50% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

/* ===== НАЗВАНИЕ ТРЕКА И ИСПОЛНИТЕЛЯ ПОВЕРХ ОБЛОЖКИ ===== */
@media (min-width: 992px) {
    .player-artwork-wrapper {
        max-width: min(400px, 90vw);
    }
}

.player-artwork-wrapper {
    width: 100%;
    margin: 0 auto;
    position: relative;
}

.player-artwork {
    border-radius: 2rem;
    background-color: #ffffff00;
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.player-artwork img {
    border-radius: 0.65rem;
    box-shadow: var(--shadow-xl);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-cover-title-overlay {
    position: static;
    width: 100%;
    max-width: min(420px, 86vw);
    margin: 0 auto;
    padding: clamp(4px, 1vh, 8px) 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: clamp(2px, 0.5vh, 4px);
    text-align: center;
}

@media (min-width: 992px) {
    .player-cover-title-overlay {
        max-width: min(420px, 32vw);
        padding: clamp(4px, 1vh, 8px) 0;
    }
}

/* ===== ФИНАЛЬНАЯ НОРМАЛИЗАЦИЯ АДАПТИВА ===== */
.app {
    min-height: 100dvh;
    height: 100dvh;
    width: 100vw;
    overflow-x: hidden;
}

/* Исправление для мобильных браузеров с адресной строкой */
@supports (height: 100dvh) {
    .app {
        height: 100dvh;
    }
}

/* Безопасные области для iPhone с челкой и Dynamic Island */
@supports (padding: max(0px)) {
    .header {
        padding-left: max(0, env(safe-area-inset-left));
        padding-right: max(0, env(safe-area-inset-right));
    }

    .mobile-menu {
        padding-left: max(0, env(safe-area-inset-left));
        padding-right: max(0, env(safe-area-inset-right));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

@media (min-width: 992px) {
    @supports (padding: max(0px)) {
        .player {
            padding-top: max(clamp(5rem, 10vh, 7rem), env(safe-area-inset-top)) !important;
            padding-bottom: max(clamp(2rem, 5vh, 3rem), env(safe-area-inset-bottom)) !important;
        }
    }
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.75rem, 2vw, 1.5rem);
}

.toggle-options {
    display: flex;
    align-items: center;
    gap: clamp(0.5rem, 1.5vw, 1rem) !important;
}

@media (min-width: 992px) {
    .player {
        padding: clamp(0.75rem, 2vw, 2rem) !important;
    }

    .player-wrapper {
        width: min(100%, 1280px);
        margin-left: auto !important;
        margin-right: auto !important;
        padding: clamp(0.75rem, 2vw, 2rem) !important;
    }
}

.player-cover {
    width: 100%;
    gap: clamp(1rem, 2.5vh, 2rem);
}

@media (min-width: 992px) {
    .player-artwork-wrapper {
        max-width: min(420px, 86vw);
    }

    .player-artwork {
        max-width: min(420px, 86vw) !important;
        width: 100%;
        margin: 0 auto;
    }
}

@media (min-width: 992px) {
    .player-controller {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: clamp(1rem, 3vw, 3rem) !important;
        width: fit-content;
        max-width: 100%;
        margin: 0 auto;
        padding: clamp(0.75rem, 2vw, 1.25rem) clamp(1rem, 3vw, 2rem) !important;
        border-radius: 999px !important;
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: none;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }

    .player-button-play {
        min-width: clamp(56px, 6vw, 76px) !important;
        min-height: clamp(56px, 6vw, 76px) !important;
    }

    .player-button-play .i {
        width: clamp(24px, 2vw, 34px) !important;
        height: clamp(24px, 2vw, 34px) !important;
    }

    .player-button-volume-toggle,
    .player-button-lyrics,
    .player-button {
        min-width: clamp(48px, 5.5vw, 68px) !important;
        min-height: clamp(48px, 5.5vw, 68px) !important;
    }
}

.player-button-volume {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.player-button,
.player-button-play,
.player-button-volume-toggle,
.player-button-lyrics {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.player-button[hidden],
.player-button-play[hidden],
.player-button-volume-toggle[hidden],
.player-button-lyrics[hidden] {
    display: none !important;
}

@media (min-width: 992px) {
    .desktop-only { display: inline-flex !important; }
    .mobile-only { display: none !important; }

    .header-wrapper {
        padding: clamp(1rem, 2vw, 2rem);
    }

    .header-logo-img {
        height: clamp(80px, 8.5vw, 150px) !important;
        max-height: clamp(80px, 8.5vw, 150px) !important;
    }

    .player {
        display: grid;
        place-items: center;
        min-height: 100dvh;
        padding-top: clamp(5rem, 10vh, 7rem) !important;
        padding-bottom: clamp(2rem, 5vh, 3rem) !important;
    }

    .player-wrapper {
        padding-top: clamp(1rem, 2vh, 2rem) !important;
        padding-bottom: clamp(1rem, 2vh, 2rem) !important;
    }

    .player-cover {
        align-items: center;
        justify-content: center;
        gap: 1.75rem;
    }

    .player-artwork-wrapper,
    .player-artwork {
        max-width: min(420px, 32vw) !important;
    }

    .about-button.desktop-only,
    #history-button {
        --btn-fs: clamp(0.72rem, 0.78vw, 0.95rem) !important;
        --btn-padding: clamp(0.65rem, 0.8vw, 0.9rem) clamp(0.9rem, 1vw, 1.15rem) !important;
        --i-size: clamp(0.9rem, 1vw, 1.1rem) !important;
        --btn-gap: 0.45rem !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: inline-flex !important; }

    .header-wrapper {
        padding: 0.9rem 1rem;
    }

    .header-logo-img {
        height: 72px !important;
        max-height: 72px !important;
    }

    .player {
        min-height: 100dvh;
        padding-top: 5.5rem !important;
        padding-bottom: 1.5rem !important;
        overflow: hidden;
    }

    .player-wrapper {
        padding: 1rem !important;
        margin-bottom: 0 !important;
    }

    .player-cover {
        justify-content: center;
        gap: 1.25rem;
    }

    .player-artwork-wrapper {
        max-width: min(340px, 58vw, 48vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .song-artist {
        font-size: clamp(0.95rem, 2vw, 1.15rem) !important;
    }

    .song-name {
        font-size: clamp(1.2rem, 3vw, 1.55rem) !important;
    }

    .player-controller {
        gap: 2.1rem !important;
        padding: 0.9rem 1.8rem !important;
        margin-top: 0;
        margin-bottom: clamp(8px, 2vh, 16px);
    }

    .player-button-play {
        min-width: 64px !important;
        min-height: 64px !important;
    }

    .player-button-play .i {
        width: 28px !important;
        height: 28px !important;
    }
}

@media (max-width: 767px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: inline-flex !important; }

    .header-wrapper {
        padding: 0.75rem 0.85rem;
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }

    .header-logo-img {
        height: clamp(50px, 13vw, 64px) !important;
        max-height: clamp(50px, 13vw, 64px) !important;
    }

    .mobile-icon-button {
        width: clamp(40px, 10vw, 44px) !important;
        height: clamp(40px, 10vw, 44px) !important;
        --i-size: clamp(18px, 4vw, 20px) !important;
    }

    .player {
        min-height: 100dvh;
        height: 100dvh;
        padding-top: calc(max(4.75rem, env(safe-area-inset-top)) + env(safe-area-inset-top)) !important;
        padding-bottom: max(1rem, env(safe-area-inset-bottom)) !important;
        overflow: hidden;
    }

    .player-wrapper {
        padding: 0.75rem !important;
        margin-bottom: 0 !important;
    }

    .player-cover {
        justify-content: center;
        gap: 1.5rem;
    }

    .player-artwork-wrapper {
        max-width: min(280px, 72vw, 42vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-cover-title-overlay {
        padding: clamp(4px, 1vh, 6px) 0 !important;
        gap: 2px !important;
    }

    .song-artist {
        font-size: clamp(0.82rem, 3.4vw, 1rem) !important;
    }

    .song-name {
        font-size: clamp(1rem, 4.6vw, 1.3rem) !important;
    }

    .player-controller {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.45rem !important;
        padding: 0.8rem 1.25rem !important;
        margin-bottom: clamp(4px, 1.5vh, 10px);
        margin-top: 0;
    }

    .player-button-volume {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
    }

    .player-button,
    .player-button-volume-toggle,
    .player-button-lyrics {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .player-button-play {
        min-width: 56px !important;
        min-height: 56px !important;
    }

    .player-button-play .i {
        width: 24px !important;
        height: 24px !important;
    }

    .dropdown {
        width: min(220px, calc(100vw - 2rem)) !important;
        left: 50%;
        bottom: max(5.5rem, calc(env(safe-area-inset-bottom) + 5rem)) !important;
        transform: translateX(-50%);
    }
}

@media (max-width: 767px) and (orientation: landscape) {
    .header-wrapper {
        padding: 0.55rem 0.75rem;
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }

    .header-logo-img {
        height: 46px !important;
        max-height: 46px !important;
    }

    .player {
        padding-top: calc(max(3.9rem, env(safe-area-inset-top)) + env(safe-area-inset-top)) !important;
        padding-bottom: max(0.75rem, env(safe-area-inset-bottom)) !important;
        height: 100dvh;
        min-height: 100dvh;
        overflow: hidden;
    }

    .player-wrapper {
        margin-bottom: 0 !important;
    }

    .player-cover {
        gap: 1rem;
    }

    .player-artwork-wrapper {
        max-width: min(200px, 32vw, 55vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-cover-title-overlay {
        padding: clamp(3px, 0.8vh, 5px) 0 !important;
    }

    .song-artist {
        font-size: 0.76rem !important;
    }

    .song-name {
        font-size: 0.98rem !important;
    }

    .player-controller {
        display: flex;
        gap: 1.2rem !important;
        padding: 0.55rem 1rem !important;
        margin-bottom: max(4px, env(safe-area-inset-bottom));
        margin-top: 0;
    }

    .player-button-volume {
        width: 46px;
        min-width: 46px;
        min-height: 46px;
    }

    .player-button,
    .player-button-volume-toggle,
    .player-button-lyrics {
        min-width: 46px !important;
        min-height: 46px !important;
    }

    .player-button-play {
        min-width: 54px !important;
        min-height: 54px !important;
    }

    .player-button-play .i {
        width: 22px !important;
        height: 22px !important;
    }
}

@media (max-width: 480px) {
    .player-artwork-wrapper {
        max-width: min(260px, 68vw, 40vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-controller {
        display: flex;
        gap: 1.25rem !important;
        padding: 0.75rem 1.15rem !important;
        margin-bottom: clamp(4px, 1.5vh, 10px);
        margin-top: 0;
    }

    .player-button-play {
        min-width: 54px !important;
        min-height: 54px !important;
    }
}

@media (max-width: 380px) {
    .header-wrapper {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
        padding-left: max(0.7rem, env(safe-area-inset-left));
        padding-right: max(0.7rem, env(safe-area-inset-right));
    }

    .player-wrapper {
        padding: 0.6rem !important;
        margin-bottom: 0 !important;
    }

    .player-artwork-wrapper {
        max-width: min(240px, 75vw, 38vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-controller {
        display: flex;
        gap: 1.05rem !important;
        padding: 0.7rem 1rem !important;
        margin-bottom: max(4px, env(safe-area-inset-bottom));
        margin-top: 0;
    }

    .player-button-volume {
        width: 42px;
        min-width: 42px;
        min-height: 42px;
    }

    .player-button,
    .player-button-volume-toggle,
    .player-button-lyrics {
        min-width: 42px !important;
        min-height: 42px !important;
    }

    .player-button-play {
        min-width: 52px !important;
        min-height: 52px !important;
    }

    .player-button-play .i {
        width: 22px !important;
        height: 22px !important;
    }

    .song-artist {
        font-size: clamp(0.75rem, 3.2vw, 0.9rem) !important;
    }

    .song-name {
        font-size: clamp(0.9rem, 4vw, 1.1rem) !important;
    }
}

/* Специфичные стили для iPhone SE 1st/2nd/3rd gen */
@media (max-width: 375px) and (max-height: 667px) {
    .player {
        padding-top: calc(4rem + env(safe-area-inset-top)) !important;
        overflow: hidden;
    }

    .player-wrapper {
        margin-bottom: 0 !important;
    }

    .player-artwork-wrapper {
        max-width: min(220px, 78vw, 38vh);
    }

    .player-artwork {
        max-width: 100% !important;
        margin-bottom: 0;
    }

    .player-controller {
        display: flex;
        gap: 0.9rem !important;
        padding: 0.65rem 0.9rem !important;
        margin-top: 0;
        margin-bottom: max(4px, env(safe-area-inset-bottom));
    }

    .player-button-play {
        min-width: 50px !important;
        min-height: 50px !important;
    }

    .player-button-play .i {
        width: 20px !important;
        height: 20px !important;
    }
}

/* ===== УЛУЧШЕННЫЙ СЛАЙДЕР ГРОМКОСТИ ===== */

/* Контейнер кнопки громкости */
.player-button-volume {
    position: relative;
    z-index: 50;
}

/* Оверлей для закрытия на мобильных */
.volume-overlay {
    display: none;
}

@media (max-width: 991px) {
    .volume-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.25s ease, visibility 0.25s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .volume-overlay.is-active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

/* Кнопка закрытия внутри dropdown */
.volume-close-btn {
    display: none;
}

@media (max-width: 991px) {
    .volume-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        padding: 0;
        background: rgba(255, 255, 255, 0.2);
        border: none;
        border-radius: 50%;
        color: #fff;
        cursor: pointer;
        transition: background 0.2s ease, transform 0.2s ease;
        z-index: 10;
        -webkit-tap-highlight-color: transparent;
    }

    .volume-close-btn:hover,
    .volume-close-btn:active {
        background: rgba(255, 255, 255, 0.35);
        transform: scale(1.1);
    }

    .volume-close-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Индикатор уровня громкости */
.volume-label {
    display: none;
}

@media (max-width: 991px) {
    .volume-label {
        display: block;
        text-align: center;
        font-size: 2.5rem;
        font-weight: 700;
        color: #fff;
        margin-bottom: 16px;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
        font-family: 'Montserrat', sans-serif;
    }
}

/* Заголовок панели громкости */
.volume-title {
    display: none;
}

@media (max-width: 991px) {
    .volume-title {
        display: block;
        text-align: center;
        font-size: 0.85rem;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.7);
        text-transform: uppercase;
        letter-spacing: 2px;
        margin-bottom: 8px;
        font-family: 'Montserrat', sans-serif;
    }
}

/* Dropdown панель громкости */
#player-volume {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    background: rgba(20, 20, 25, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

#player-volume.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

#player-volume:not(.is-active) {
    transform: translateX(-50%) translateY(8px);
}

/* Стрелка указатель */
#player-volume::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid rgba(20, 20, 25, 0.95);
}

/* Обёртка слайдера */
.player-range-wrapper {
    position: relative;
    height: 8px;
    width: 100%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    cursor: pointer;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Заполненная часть слайдера */
.player-range-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--accent, #ff6b35), var(--accent, #ff8c5a));
    border-radius: 10px;
    pointer-events: none;
    transition: width 0.05s linear;
}

/* Ползунок */
.player-range-thumb {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 0 2px var(--accent, #ff6b35);
    cursor: grab;
    touch-action: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    z-index: 10;
}

.player-range-thumb:hover {
    transform: translateY(-50%) scale(1.15);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 0 3px var(--accent, #ff6b35);
}

.player-range-thumb:active,
.player-range-thumb.is-dragging {
    cursor: grabbing;
    transform: translateY(-50%) scale(1.1);
}

/* Скрытый нативный input range для доступности */
.player-volume {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 20;
    -webkit-appearance: none;
    appearance: none;
    touch-action: none;
}

/* Убираем стандартные стили range для кроссбраузерности */
.player-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.player-volume::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.player-volume::-webkit-slider-runnable-track {
    height: 100%;
    cursor: pointer;
}

.player-volume::-moz-range-track {
    height: 100%;
    cursor: pointer;
}

/* Мобильные стили для dropdown громкости */
@media (max-width: 991px) {
    #player-volume {
        position: fixed;
        bottom: auto;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: min(300px, calc(100vw - 2rem));
        padding: 55px 28px 28px 28px;
        border-radius: 20px;
        z-index: 1000;
        background: rgba(30, 30, 35, 0.98) !important;
        border: 2px solid rgba(255, 255, 255, 0.25) !important;
        box-shadow:
            0 12px 48px rgba(0, 0, 0, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.1) inset !important;
    }

    #player-volume.is-active {
        transform: translate(-50%, -50%);
        opacity: 1 !important;
        visibility: visible !important;
    }

    #player-volume:not(.is-active) {
        transform: translate(-50%, -45%);
    }

    #player-volume::after {
        display: none;
    }

    .player-range-wrapper {
        height: 16px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.2) !important;
    }

    .player-range-fill {
        background: linear-gradient(90deg, #ff6b35, #ff8c5a) !important;
    }

    .player-range-thumb {
        width: 32px;
        height: 32px;
        background: #fff !important;
        box-shadow:
            0 3px 10px rgba(0, 0, 0, 0.4),
            0 0 0 3px #ff6b35 !important;
    }
}

/* Планшеты в портретной ориентации */
@media (min-width: 768px) and (max-width: 991px) and (orientation: portrait) {
    #player-volume {
        width: min(320px, 70vw);
        padding: 55px 30px 30px 30px;
    }

    .player-range-wrapper {
        height: 18px;
    }

    .player-range-thumb {
        width: 36px;
        height: 36px;
    }
}

/* Ландшафтная ориентация на мобильных */
@media (max-width: 991px) and (orientation: landscape) {
    #player-volume {
        width: min(260px, 45vw);
        padding: 50px 22px 22px 22px;
        padding-bottom: max(22px, env(safe-area-inset-bottom));
    }

    .player-range-wrapper {
        height: 14px;
    }

    .player-range-thumb {
        width: 28px;
        height: 28px;
    }
}

/* iPhone с челкой в ландшафте */
@supports (padding: max(0px)) {
    @media (max-width: 890px) and (orientation: landscape) {
        .player {
            padding-left: max(0, env(safe-area-inset-left));
            padding-right: max(0, env(safe-area-inset-right));
        }

        .player-controller {
            padding-left: max(1rem, env(safe-area-inset-left)) !important;
            padding-right: max(1rem, env(safe-area-inset-right)) !important;
        }
    }
}

/* Очень маленькие экраны */
@media (max-width: 380px) {
    #player-volume {
        width: calc(100vw - 1.5rem);
        padding: 50px 20px 24px 20px;
    }

    .player-range-wrapper {
        height: 14px;
    }

    .player-range-thumb {
        width: 28px;
        height: 28px;
    }
}

/* Десктоп стили */
@media (min-width: 992px) {
    #player-volume {
        width: 160px;
        padding: 18px 16px;
    }

    .player-range-wrapper {
        height: 6px;
    }

    .player-range-thumb {
        width: 18px;
        height: 18px;
    }
}

/* ===== ФИНАЛЬНАЯ НОРМАЛИЗАЦИЯ: убираем фон панели управления ===== */
.player-controller {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
}

/* Переопределяем старые размеры кнопок volume/lyrics в media queries */
.player-button-volume-toggle,
.player-button-lyrics {
    min-width: clamp(36px, 4.5vw, 52px) !important;
    min-height: clamp(36px, 4.5vw, 52px) !important;
    width: clamp(36px, 4.5vw, 52px) !important;
    height: clamp(36px, 4.5vw, 52px) !important;
    aspect-ratio: 1/1 !important;
    padding: 0 !important;
    border-radius: 50% !important;
}

/* ===== КРУГЛЫЙ ФОН ПОД ЛОГОТИП ===== */
.header-logo {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: rgba(28, 28, 38, 0.92) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Логотип вписывается внутрь круга */
.header-logo .header-logo-img {
    height: auto !important;
    width: auto !important;
    max-height: 76% !important;
    max-width: 76% !important;
    object-fit: contain !important;
    filter:
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6))
        drop-shadow(0 0 20px rgba(255, 255, 255, 0.1)) !important;
}

/* Размеры контейнера под каждый breakpoint */
@media (max-width: 380px) {
    .header-logo {
        width: clamp(52px, 12vw, 64px) !important;
        height: clamp(52px, 12vw, 64px) !important;
    }
}

@media (max-width: 480px) {
    .header-logo {
        width: 54px !important;
        height: 54px !important;
    }
}

@media (max-width: 767px) and (orientation: landscape) {
    .header-logo {
        width: 50px !important;
        height: 50px !important;
    }
}

@media (max-width: 767px) {
    .header-logo {
        width: clamp(54px, 13vw, 68px) !important;
        height: clamp(54px, 13vw, 68px) !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) and (orientation: landscape) {
    .header-logo {
        width: 60px !important;
        height: 60px !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) and (orientation: portrait) {
    .header-logo {
        width: 72px !important;
        height: 72px !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .header-logo {
        width: 76px !important;
        height: 76px !important;
    }
}

@media (min-width: 992px) {
    .header-logo {
        width: clamp(84px, 8.5vw, 150px) !important;
        height: clamp(84px, 8.5vw, 150px) !important;
    }
}

.landscape-mode .header-logo {
    width: 54px !important;
    height: 54px !important;
}


/* =========================================================
   MOBILE PLAYER LAYOUT v1
   Отдельная мобильная архитектура. Desktop не меняется.
   ========================================================= */
.mobile-layout {
    display: none;
}

@media (max-width: 767px) {
    html,
    body {
        min-height: 100%;
        overflow-x: hidden;
    }

    body {
        min-height: 100dvh;
        -webkit-tap-highlight-color: transparent;
        background:
            radial-gradient(circle at top,
            #1a1d2e 0%,
            #0b0d16 45%,
            #050608 100%) !important;
    }

    .header,
    .desktop-layout,
    .visualizer {
        display: none !important;
    }

    .app {
        min-height: 100dvh !important;
        height: 100dvh !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .mobile-layout {
        --mobile-panel: rgba(16, 16, 22, 0.76);
        --mobile-panel-strong: rgba(18, 18, 26, 0.92);
        --mobile-line: rgba(255, 255, 255, 0.12);
        --mobile-text-muted: rgba(255, 255, 255, 0.66);
        display: flex;
        flex-direction: column;
        min-height: 100dvh;
        height: 100dvh;
        position: relative;
        z-index: 4;
        padding: max(10px, env(safe-area-inset-top)) 14px calc(clamp(112px, 15dvh, 142px) + env(safe-area-inset-bottom));
        color: #fff;
    }

    .mobile-player-shell {
        display: flex;
        flex-direction: column;
        min-height: 0;
        height: 100%;
        margin-bottom: clamp(12px, 3.2dvh, 28px);
        border-radius: 28px;
        background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
        border: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 22px 70px rgba(0,0,0,0.42);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        overflow: hidden;
    }

    .mobile-player-topbar {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 10px;
        padding: 12px 14px 8px;
        flex: 0 0 auto;
    }

    .mobile-brand {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,0.36);
        border: 1px solid rgba(255,255,255,0.14);
        box-shadow: 0 8px 22px rgba(0,0,0,0.35);
    }

    .mobile-brand img {
        max-width: 72%;
        max-height: 72%;
        display: block;
    }

    .mobile-live-pill {
        grid-column: 2;
        justify-self: center;
        min-width: 86px;
        height: 32px;
        padding: 0 16px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.14em;
        background: rgba(0,0,0,0.18);
        border: 1px solid rgba(255,255,255,0.08);
        color: rgba(255,255,255,0.95);
    }

    .mobile-menu-open {
        grid-column: 3;
        justify-self: end;
    }

    .mobile-icon-btn,
    .mobile-cover-card,
    .mobile-control-btn,
    .mobile-play-btn,
    .mobile-sheet-close {
        border: 0;
        color: #fff;
        cursor: pointer;
        touch-action: manipulation;
        -webkit-appearance: none;
        appearance: none;
    }

    .mobile-icon-btn {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: rgba(0,0,0,0.32);
        border: 1px solid rgba(255,255,255,0.12);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-icon-btn .i,
    .mobile-control-btn .i,
    .mobile-sheet-close .i {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-player-main {
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: clamp(8px, 1.8dvh, 14px);
        padding: 6px 14px 14px;
    }

    .mobile-cover-card {
        width: min(82vw, 420px, 54dvh);
        aspect-ratio: 1 / 1;
        position: relative;
        border-radius: 30px;
        isolation: isolate;
        padding: 0;
        background: transparent;
        overflow: visible;
        cursor: pointer;
    }

    .mobile-cover-card:active .mobile-song-cover {
        transform: scale(.985);
    }

    .mobile-song-cover {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        border-radius: inherit;
        border: 1px solid rgba(255,255,255,0.16);
        box-shadow: 0 26px 60px rgba(0,0,0,0.52);
        position: relative;
        z-index: 2;
        transition: opacity .28s ease, transform .32s ease;
    }

    .mobile-cover-glow {
        position: absolute;
        inset: 12%;
        z-index: 1;
        border-radius: inherit;
        background: var(--accent, rgba(255, 107, 53, 0.5));
        filter: blur(44px);
        opacity: 0.24;
        transform: translateY(18px);
    }

    .mobile-track-card {
        width: 100%;
        max-width: 420px;
        text-align: center;
        padding: 12px 14px;
        border-radius: 22px;
        background: rgba(0,0,0,0.18);
        border: 1px solid rgba(255,255,255,0.08);
    }

    .mobile-now-label {
        margin-bottom: 7px;
        color: var(--mobile-text-muted);
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.16em;
        font-weight: 700;
    }

    .mobile-marquee {
        width: 100%;
        overflow: hidden;
        white-space: nowrap;
        line-height: 1.18;
    }

    .mobile-song-artist,
    .mobile-song-name {
        display: inline-block;
        white-space: nowrap;
        vertical-align: bottom;
        max-width: none;
        overflow: visible;
        text-overflow: clip;
    }

    .mobile-marquee-wrapper {
        display: inline-flex;
        white-space: nowrap;
        will-change: transform;
    }

    .mobile-marquee-wrapper > span {
        padding-right: 2.5em;
    }

    .mobile-song-artist {
        font-size: clamp(1.18rem, 5.6vw, 1.7rem);
        font-weight: 800;
        color: rgba(255,255,255,0.96);
    }

    .mobile-song-name {
        margin-top: 4px;
        font-size: clamp(1.02rem, 4.6vw, 1.32rem);
        font-weight: 800;
        color: var(--accent, #ff6b35);
    }

    /* mobile-eq removed: extra animation under track title is disabled on phones */

    .mobile-bottom-controls {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: max(10px, env(safe-area-inset-bottom));
        z-index: 20;
        min-height: clamp(82px, 11dvh, 96px);
        padding: 8px clamp(16px, 5vw, 26px);
        border-radius: 28px;
        background: rgba(12, 12, 18, 0.86);
        border: 1px solid rgba(255,255,255,0.13);
        box-shadow: 0 16px 46px rgba(0,0,0,0.54);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        display: grid;
        grid-template-columns: minmax(74px, 1fr) clamp(76px, 20vw, 88px) minmax(74px, 1fr);
        align-items: center;
        justify-items: center;
        gap: clamp(10px, 4vw, 24px);
    }

    .mobile-control-btn {
        min-width: 0;
        min-height: 56px;
        border-radius: 18px;
        background: transparent;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: rgba(255,255,255,0.82);
        font-size: 0.66rem;
        font-weight: 700;
    }

    .mobile-control-btn img {
        width: 23px;
        height: 23px;
        object-fit: contain;
        filter: brightness(2);
    }

    .mobile-play-btn {
        width: clamp(76px, 20vw, 88px);
        height: clamp(76px, 20vw, 88px);
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--accent, #ff6b35);
        box-shadow: 0 0 28px rgba(255, 107, 53, 0.42), inset 0 1px 0 rgba(255,255,255,0.22);
    }

    .mobile-play-btn .i {
        width: clamp(32px, 8vw, 38px);
        height: clamp(32px, 8vw, 38px);
        fill: none;
        stroke: #fff;
        stroke-width: 2.2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-sheet {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 42;
        max-height: min(76dvh, 560px);
        padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
        border-radius: 28px 28px 0 0;
        background: rgba(17, 17, 24, 0.96);
        border: 1px solid rgba(255,255,255,0.12);
        box-shadow: 0 -22px 70px rgba(0,0,0,0.66);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        transform: translateY(105%);
        transition: transform .32s cubic-bezier(.2,.8,.2,1);
        touch-action: pan-y;
    }

    .mobile-bottom-sheet.is-open {
        transform: translateY(0);
    }

    .mobile-sheet-backdrop {
        position: fixed;
        inset: 0;
        z-index: 41;
        background: rgba(0,0,0,0.42);
        opacity: 0;
        transition: opacity .25s ease;
    }

    .mobile-sheet-backdrop.is-open {
        opacity: 1;
    }

    .mobile-sheet-handle {
        width: 44px;
        height: 5px;
        margin: 0 auto 12px;
        border-radius: 999px;
        background: rgba(255,255,255,0.24);
    }

    .mobile-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding-bottom: 14px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .mobile-sheet-head strong {
        font-size: 1.08rem;
        letter-spacing: .03em;
    }

    .mobile-sheet-close {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.09);
    }

    .mobile-sheet-body {
        padding-top: 16px;
        overflow-y: auto;
        max-height: calc(min(76dvh, 560px) - 86px);
    }

    .mobile-sheet-section {
        margin-bottom: 16px;
        padding: 14px;
        border-radius: 20px;
        background: rgba(255,255,255,0.055);
        border: 1px solid rgba(255,255,255,0.08);
    }

    .mobile-sheet-section h3 {
        margin: 0 0 8px;
        font-size: 1rem;
        color: var(--accent, #ff6b35);
    }

    .mobile-sheet-section p {
        margin: 0;
        color: rgba(255,255,255,0.76);
        line-height: 1.45;
        font-size: .94rem;
    }

    .mobile-volume-range {
        width: 100%;
        accent-color: var(--accent, #ff6b35);
    }

    .mobile-sheet-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .mobile-sheet-action {
        min-height: 48px;
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,0.12);
        background: rgba(255,255,255,0.08);
        color: #fff;
        font-weight: 800;
    }

    .mobile-cover-card.is-updating .mobile-song-cover {
        opacity: .72;
        transform: scale(.985);
    }

    @media (max-height: 660px) {
        .mobile-layout {
            padding-top: 8px;
        }

        .mobile-player-topbar {
            padding-top: 8px;
            padding-bottom: 4px;
        }

        .mobile-brand,
        .mobile-icon-btn {
            width: 42px;
            height: 42px;
        }

        .mobile-cover-card {
            width: min(64vw, 280px, 42dvh);
            border-radius: 24px;
        }

        .mobile-player-main {
            gap: 9px;
            padding-bottom: 10px;
        }

        .mobile-track-card {
            padding: 10px 12px;
        }

        .mobile-eq {
            height: 24px;
        }
    }

    @media (orientation: landscape) and (max-width: 767px) {
        .mobile-layout {
            padding: max(8px, env(safe-area-inset-top)) 12px calc(96px + env(safe-area-inset-bottom));
        }

        .mobile-player-shell {
            border-radius: 24px;
            margin-bottom: 12px;
        }

        .mobile-player-main {
            display: grid;
            grid-template-columns: minmax(130px, 32dvh) 1fr;
            grid-template-rows: auto auto;
            column-gap: 18px;
            justify-items: center;
        }

        .mobile-cover-card {
            width: min(38dvh, 260px);
            grid-row: 1 / 3;
        }

        .mobile-track-card {
            align-self: end;
        }

        .mobile-eq {
            align-self: start;
        }

        .mobile-bottom-controls {
            min-height: 72px;
            grid-template-columns: minmax(74px, 1fr) 72px minmax(74px, 1fr);
            border-radius: 22px;
        }

        .mobile-play-btn {
            width: 72px;
            height: 72px;
        }

        .mobile-control-btn {
            min-height: 50px;
        }
    }
}


/* =========================================================
   MOBILE PLAYER VISIBILITY FIX v1.1
   Фикс для телефонов: новый mobile layout всегда выше старого
   мобильного меню с кнопкой RuStore. Desktop-режим не затрагивается.
   ========================================================= */
@media (max-width: 991px) and (pointer: coarse) {
    html,
    body {
        width: 100%;
        min-height: 100%;
        overflow: hidden !important;
    }

    body {
        min-height: 100dvh;
        background: radial-gradient(circle at top, #1a1d2e 0%, #0b0d16 45%, #050608 100%) !important;
    }

    .app {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .header,
    .desktop-layout,
    .visualizer,
    .mobile-menu {
        display: none !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .mobile-layout {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        min-height: 100dvh !important;
        z-index: 9999 !important;
        overflow: hidden !important;
        pointer-events: auto !important;
    }

    .mobile-player-shell,
    .mobile-player-topbar,
    .mobile-player-main,
    .mobile-bottom-controls {
        visibility: visible !important;
        opacity: 1 !important;
    }

    .mobile-bottom-controls {
        display: grid !important;
        z-index: 10000 !important;
    }

    .mobile-bottom-sheet,
    .mobile-sheet-backdrop {
        z-index: 10001 !important;
    }
}

@media (min-width: 992px), (pointer: fine) {
    .mobile-layout {
        display: none !important;
    }
}

/* =========================================================
   MOBILE PLAYER CONTROLS v1.4
   Только для телефонов: в нижней панели остаются AAC/MP3, Play, Звук.
   Факты открываются нажатием на обложку текущего трека.
   ========================================================= */
@media (max-width: 991px) and (pointer: coarse) {
    .mobile-cover-card {
        border: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-bottom-controls {
        grid-template-columns: minmax(74px, 1fr) clamp(76px, 20vw, 88px) minmax(74px, 1fr) !important;
        min-height: clamp(82px, 11dvh, 96px) !important;
        padding-left: clamp(16px, 5vw, 26px) !important;
        padding-right: clamp(16px, 5vw, 26px) !important;
        gap: clamp(10px, 4vw, 24px) !important;
        justify-items: center !important;
    }

    .mobile-play-btn {
        width: clamp(76px, 20vw, 88px) !important;
        height: clamp(76px, 20vw, 88px) !important;
    }

    .mobile-play-btn .i {
        width: clamp(32px, 8vw, 38px) !important;
        height: clamp(32px, 8vw, 38px) !important;
    }

    .mobile-control-btn {
        width: 100%;
        max-width: 104px;
    }
}

@media (orientation: landscape) and (max-width: 991px) and (pointer: coarse) {
    .mobile-bottom-controls {
        grid-template-columns: minmax(74px, 1fr) 72px minmax(74px, 1fr) !important;
        min-height: 72px !important;
    }

    .mobile-play-btn {
        width: 72px !important;
        height: 72px !important;
    }
}


/* MOBILE MENU SCALE PATCH */

@media (max-width: 768px) {

    .mobile-bottom-controls {
        padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
        gap: 18px;
    }

    .mobile-bottom-controls .mobile-control-btn {
        font-size: 15px;
        gap: 8px;
    }

    .mobile-bottom-controls .mobile-control-btn i,
    .mobile-bottom-controls .mobile-control-btn svg {
        font-size: 22px;
        width: 22px;
        height: 22px;
    }

    .mobile-bottom-controls .mobile-play-btn {
        width: 72px;
        height: 72px;
        font-size: 30px;
    }
}

