/* ==========================================================
   MOBILE.CSS — media="(max-width: 768px)"
   Темы: dark (default) / light ([data-theme="light"], body.light-theme)
   ========================================================== */

/* ============ 0. ПЕРЕМЕННЫЕ ============ */
:root {
    --purple-300: #c084fc;
    --purple-400: #a78bfa;
    --purple-500: #8b5cf6;
    --purple-600: #7c3aed;
    --cyan-300:   #67e8f9;
    --cyan-400:   #22d3ee;
    --cyan-600:   #0891b2;

    --bg-dark:        #0a0515;
    --bg-dark-2:      #0a0615;
    --bg-player:      rgba(20, 12, 35, 0.95);
    --bg-sheet:       rgba(18, 12, 35, 0.98);
    --text-dark:      #e8e2f4;
    --text-dark-mut:  #a0a0c0;

    --bg-light:       #f0e8fa;
    --bg-light-card:  #f5f5f7;
    --bg-sheet-light: rgba(252, 250, 255, 0.98);
    --text-light:     #3d2c5c;
    --text-light-mut: #6b5a8a;

    --danger:         #ff4d4d;
    --danger-text:    #ff6b6b;

    --grad-accent:  linear-gradient(135deg, #c084fc, #67e8f9);
    --grad-button:  linear-gradient(135deg, #a78bfa, #8b5cf6);
    --grad-bar:     linear-gradient(to top, #8b5cf6, #22d3ee);
    --grad-bar-lt:  linear-gradient(to top, #7c3aed, #0891b2);

    --safe-top:     env(safe-area-inset-top);
    --safe-bottom:  env(safe-area-inset-bottom);
}

/* ============ 1. ВИДИМОСТЬ / СБРОС ============ */
.mobile-only         { display: block !important; }
.desktop-player-only { display: none !important; }
* { -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; }
:is(button, a, .player-control-btn, .mini-player-btn, .nav-item) {
    outline: none !important;
    -webkit-focus-ring-color: transparent !important;
}

/* ============ 2. ГЛОБАЛЬНАЯ СТРУКТУРА ============ */
html, body {
    height: 100%;
    width: 100vw !important;
    max-width: 100vw !important;
    overflow: hidden !important;
    margin: 0; padding: 0;
    background: var(--bg-dark);
    color: var(--text-dark);
}
#app-container {
    height: 100dvh !important;
    width: 100vw !important;
    display: flex; flex-direction: column;
    overflow: hidden !important;
    background:
        radial-gradient(circle at 15% 10%, rgba(138, 43, 226, 0.18), transparent 55%),
        radial-gradient(circle at 85% 90%, rgba(103, 232, 249, 0.10), transparent 55%),
        var(--bg-dark);
}
.app-layout {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    width: 100% !important;
}

/* ============ 3. СКРЫТИЕ ДЕСКТОПА ============ */
header, .sidebar, .top-bar, .bottom-player, .visualizer-container,
.menu-fab, .floating-panel, .sheet-overlay { display: none !important; }

/* ============ 4. КОНТЕНТ ============ */
.main-content {
    flex: 1 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 0 160px 0 !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}
.main-content::-webkit-scrollbar { display: none !important; }

#content-view {
    height: auto !important;
    min-height: 100% !important;
    overflow: visible !important;
    display: block !important;
    padding: calc(60px + var(--safe-top)) 12px 120px !important;
    box-sizing: border-box !important;
}
#content-view:has(.wave-screen) {
    padding: 0 !important;
    height: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
}
#content-view > * {
    animation: pageFadeInUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
@keyframes pageFadeInUp {
    0%   { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ============ 5. НИЖНЯЯ НАВИГАЦИЯ ============ */
.mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0;
    width: 100%; height: 64px;
    background: var(--bg-player);
    border-top: 1px solid rgba(138, 43, 226, 0.2);
    display: flex; justify-content: space-around; align-items: center;
    z-index: 9000;
    padding-bottom: var(--safe-bottom);
}
.nav-item {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--text-dark-mut); text-decoration: none;
    font-size: 11px; transition: .2s;
    width: 25%; height: 100%;
    position: relative;
}
.nav-icon { font-size: 20px; margin-bottom: 4px; transition: .2s; }
.nav-item.active { color: var(--purple-300); }
.nav-item.active .nav-icon {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px rgba(192, 132, 252, .6));
}
.nav-item:active .nav-icon { transform: scale(.85) translateY(-2px) !important; }
.mobile-bottom-nav .nav-item[data-page="favorites"].active .icon { color: #ff4d6d !important; }
.mobile-bottom-nav .nav-item[data-page="favorites"].active .icon path {
    fill: #ff4d6d !important;
    stroke: #ff4d6d !important;
}

/* ============ 6. МИНИ-ПЛЕЕР ============ */
.mobile-mini-player {
    position: fixed;
    bottom: 68px; left: 12px; right: 12px;
    height: 64px; border-radius: 16px;
    display: flex; flex-direction: column;
    overflow: hidden; z-index: 9001;
    transition: transform .3s cubic-bezier(.175,.885,.32,1.275);
    background: var(--bg-player);
    border: 1px solid rgba(255, 255, 255, .1);
    border-top: 1px solid rgba(255, 255, 255, .2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.mobile-mini-player.hidden { display: none !important; }

.mini-player-progress {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
    z-index: 2;
    border-radius: 16px 16px 0 0;
}
.mini-player-progress-fill {
    width: 0%; height: 100%;
    background: linear-gradient(90deg, #a78bfa, #c084fc);
    transition: width .1s linear;
    box-shadow: 0 0 10px rgba(192, 132, 252, .5);
    border-radius: 16px 0 0 0;
    position: relative;
}
.mini-player-progress-fill::after {
    content: '';
    position: absolute;
    right: -4px; top: 50%;
    transform: translateY(-50%);
    width: 8px; height: 8px;
    background: #fff; border-radius: 50%;
    box-shadow: 0 0 8px var(--purple-300);
    opacity: 0; transition: opacity 0.2s;
}
.mini-player-progress:hover .mini-player-progress-fill::after,
.mini-player-progress:active .mini-player-progress-fill::after { opacity: 1; }

.mini-player-content {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; height: 100%; gap: 8px;
    box-sizing: border-box; width: 100%;
}
.mini-player-cover {
    width: 46px; height: 46px; border-radius: 8px;
    background: linear-gradient(135deg, #2a1a4a, #1a0a2a);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; overflow: hidden; flex-shrink: 0;
}
.mini-player-cover img { width: 100%; height: 100%; object-fit: cover; }
.mini-player-info {
    flex: 1; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    min-width: 0; margin-right: 8px;
}
.mini-player-title {
    color: #fff; font-size: 14px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-player-artist {
    color: var(--text-dark-mut); font-size: 12px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mini-player-controls { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.mini-player-btn {
    background: none; border: none; color: #fff;
    font-size: 18px; cursor: pointer; padding: 0;
    display: flex; align-items: center; justify-content: center;
    transition: .2s; width: 36px; height: 36px; border-radius: 50%;
}
.mini-player-btn:active { transform: scale(.9); color: var(--purple-300); }
.mini-player-btn.play-btn {
    background: var(--grad-button);
    width: 40px; height: 40px; font-size: 18px;
    box-shadow: 0 0 15px rgba(139, 92, 246, .4);
    color: #fff !important;
}
.mini-like-btn.liked,
.mini-like-btn.liked i { color: #ff4d6d; }

/* ============ 7. ПОЛНОЭКРАННЫЙ ПЛЕЕР ============ */
.fullscreen-player {
    position: fixed; inset: 0;
    height: 100vh; height: 100dvh;
    background: var(--bg-dark);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
    display: flex; flex-direction: column;
    overflow: hidden;
    color: var(--text-dark);
}
.fullscreen-player.active { transform: translateY(0); }
.player-bg-blur {
    position: absolute; inset: -20%;
    background:
        radial-gradient(circle at 50% 30%, rgba(138, 43, 226, .4), transparent 60%),
        radial-gradient(circle at 50% 80%, rgba(103, 232, 249, .2), transparent 60%);
    filter: blur(30px);
    z-index: 0; pointer-events: none;
    transition: background .5s ease;
}
.player-drag-handle {
    width: 40px; height: 4px;
    background: rgba(255, 255, 255, .2);
    border-radius: 2px;
    margin: 12px auto; flex-shrink: 0; z-index: 1;
}
.player-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px 10px; flex-shrink: 0; z-index: 1;
}
.player-header-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    border: none; color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: .2s;
}
.player-header-btn:active { transform: scale(.9); }
.player-header-title {
    font-size: 12px; font-weight: 600;
    color: var(--text-dark-mut);
    text-transform: uppercase; letter-spacing: 2px;
}
.player-artwork-container {
    flex: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; z-index: 1; min-height: 0;
}
.player-artwork {
    position: relative;
    width: 100%; max-width: min(320px, 75vw);
    aspect-ratio: 1;
    background: linear-gradient(135deg, #2a1a4a, #1a0a2a);
    border-radius: 24px;
    display: flex; align-items: center; justify-content: center;
    font-size: 80px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, .6), 0 0 40px rgba(138, 43, 226, .2);
    overflow: hidden;
    transition: transform .4s ease, box-shadow .4s ease;
}
.artwork-img {
    width: 100%; height: 100%;
    object-fit: cover; border-radius: 24px;
    position: relative; z-index: 2;
}
.player-artwork.playing .artwork-img { animation: pulse-cover 4s infinite alternate ease-in-out; }
@keyframes pulse-cover { 0% { transform: scale(1); } 100% { transform: scale(1.02); } }
.vinyl-record {
    position: absolute; inset: 5%;
    background: repeating-radial-gradient(circle, #111 0%, #222 2%, #111 4%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, .8), 0 0 30px rgba(0, 0, 0, .5);
    animation: spinVinyl 3s linear infinite;
    animation-play-state: paused;
}
.player-artwork.playing .vinyl-record { animation-play-state: running; }
.vinyl-center {
    width: 30%; height: 30%;
    background: var(--purple-300); border-radius: 50%;
    border: 4px solid #1a1a1a;
    box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}
@keyframes spinVinyl { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.player-artwork.playing {
    transform: scale(.95);
    box-shadow: 0 20px 40px rgba(0, 0, 0, .8), 0 0 60px rgba(167, 139, 250, .3);
}
.player-track-info-full {
    padding: 10px 30px 20px;
    text-align: center; z-index: 1; flex-shrink: 0;
}
.player-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 0 10px;
    min-width: 0;
}
.player-title-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-dark-mut);
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.2s;
    flex-shrink: 0;
}
.player-title-menu-btn:active {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.player-track-title-full {
    font-size: 24px; font-weight: 800;
    color: #fff;
    margin: 0;
    white-space: nowrap; overflow: hidden; text-overflow: clip;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
    flex: 0 1 auto;
    display: flex; justify-content: center;
    min-width: 0; max-width: 100%;
}
.player-track-title-full.marquee-active { justify-content: flex-start; }
.player-track-artist-full {
    font-size: 16px; color: #b0b0c0;
    font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: clip;
    display: flex; justify-content: center;
    min-width: 0; max-width: 100%;
}
.player-track-artist-full.marquee-active { justify-content: flex-start; }
.marquee-inner {
    display: flex;
    white-space: nowrap;
    animation: marqueeInfinite 15s linear infinite;
}
.marquee-inner span { padding-right: 60px; flex-shrink: 0; }
@keyframes marqueeInfinite {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.player-progress-container { padding: 0 24px 10px; z-index: 1; flex-shrink: 0; }
.progress-bar-full {
    height: 6px; background: rgba(255, 255, 255, .15);
    border-radius: 3px; cursor: pointer; position: relative;
    margin-bottom: 8px;
    display: flex; align-items: center;
}
.progress-fill-full {
    width: 0%; height: 100%; background: #fff;
    border-radius: 3px; position: relative;
    transition: width .1s linear;
}
.progress-knob {
    position: absolute; right: -6px;
    width: 12px; height: 12px;
    background: #fff; border-radius: 50%;
    box-shadow: 0 0 10px rgba(255, 255, 255, .5);
    opacity: 0; transition: opacity .2s;
}
.progress-bar-full:hover .progress-knob,
.progress-bar-full:active .progress-knob { opacity: 1; }
.progress-times {
    display: flex; justify-content: space-between;
    font-size: 12px; color: var(--text-dark-mut);
    font-family: monospace; font-weight: 600;
}
.player-main-controls {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 30px 20px; z-index: 1; flex-shrink: 0;
}
.player-control-btn {
    width: 48px; height: 48px; border-radius: 50%;
    background: transparent; border: none;
    color: #fff; font-size: 22px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: .2s;
}
.player-control-btn:active { transform: scale(.9); color: var(--purple-400); }
.player-control-btn.play-btn {
    width: 72px; height: 72px;
    background: #fff; color: #000;
    font-size: 28px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, .3);
}
.player-control-btn.play-btn:active { transform: scale(.95); background: #e0e0e0; }
.player-control-btn.play-btn:disabled {
    opacity: .5 !important; background: #555 !important;
    color: #888 !important; transform: none !important;
}

/* Визуализатор в полноэкранном плеере */
.player-visualizer {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    height: 40px !important;
    margin: 10px auto 20px auto !important;
    width: 80% !important;
    max-width: 280px;
    padding: 0 !important;
    box-sizing: border-box !important;
}
.player-visualizer.hidden { display: none !important; }
.player-visualizer-bar {
    width: 4px !important;
    background: linear-gradient(to top, #c084fc, #67e8f9) !important;
    border-radius: 4px !important;
    min-height: 3px !important;
    transition: height 0.1s ease !important;
    box-shadow: none !important;
}

.player-actions {
    display: flex !important;
    justify-content: space-around !important;
    align-items: flex-start !important;
    padding: 10px 10px calc(20px + var(--safe-bottom));
    z-index: 1; flex-shrink: 0;
}
.player-action-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 6px; background: transparent; border: none;
    color: var(--text-dark-mut); cursor: pointer; transition: .2s;
    width: 33.33% !important; padding: 0;
    text-decoration: none !important;
}
.player-action-item span:first-child {
    font-size: 24px;
    background: rgba(255, 255, 255, .05);
    width: 48px; height: 48px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: .2s; flex-shrink: 0;
}
.player-action-item span:last-child {
    font-size: 10px; font-weight: 600;
    text-transform: uppercase; letter-spacing: .5px;
    white-space: nowrap;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.player-action-item:active span:first-child {
    background: rgba(138, 43, 226, .3); color: #fff;
    transform: scale(.95);
}
.player-action-item.active { color: var(--purple-300); }

/* Меню трека в полноэкранном плеере */
.mobile-player-dropdown {
    position: fixed; right: 16px;
    background: var(--bg-sheet);
    border-radius: 16px;
    border: 1px solid rgba(138, 43, 226, .3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .5), 0 0 30px rgba(138, 43, 226, .2);
    min-width: 200px; z-index: 99999; padding: 8px;
}
.mobile-player-dropdown.hidden { display: none; }
.mobile-player-dropdown .dropdown-item {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 12px 16px;
    background: transparent; border: none;
    color: #c0c0e0; font-size: 14px; text-align: left;
    border-radius: 10px; cursor: pointer; transition: .15s;
}
.mobile-player-dropdown .dropdown-item:hover {
    background: rgba(138, 43, 226, .2); color: #fff;
}

body:has(.fullscreen-player.active) :is(.mobile-bottom-nav, .mobile-mini-player) {
    display: none !important;
}

/* ============ 8. КОМПАКТНЫЙ СПИСОК ТРЕКОВ ============ */
#content-view > h2,
:is(.artist-page-content h2) {
    font-size: 10px !important;
    font-weight: 800 !important;
    margin: 10px 0 16px 0 !important;
    padding-left: 8px;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.track-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    padding: 0 4px !important;
}
.swipe-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 4px;
}
.track-card {
    display: flex !important;
    align-items: center !important;
    padding: 6px 8px !important;
    background: var(--bg-dark-2) !important;
    border: none !important;
    border-radius: 10px !important;
    gap: 12px !important;
    min-height: 60px;
    position: relative !important;
    z-index: 2 !important;
    margin-bottom: 0;
    touch-action: pan-y;
    transition: background .2s ease;
}
.track-card:active { background: rgba(255, 255, 255, .08) !important; }
.track-card.playing { background: rgba(139, 92, 246, .15) !important; }

.track-card-cover {
    width: 48px !important; height: 48px !important;
    border-radius: 6px !important;
    margin-bottom: 0 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .2) !important;
    flex-shrink: 0 !important;
    object-fit: cover;
    image-rendering: -webkit-optimize-contrast;
}
.track-card-info-wrapper {
    display: flex; flex-direction: column; justify-content: center;
    flex: 1 !important; min-width: 0; gap: 2px;
}
.track-card-title {
    font-size: 15px !important; font-weight: 500 !important;
    margin: 0 !important; color: #fff !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-card-artist {
    font-size: 13px !important; color: var(--text-dark-mut) !important;
    display: flex; align-items: center; gap: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-card-artist span {
    font-size: 9px !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
    font-weight: 700; letter-spacing: .3px;
    background: #ff5500 !important; color: #fff !important;
    transform: translateY(1px);
}
.track-menu-container {
    position: relative !important;
    top: auto !important; right: auto !important;
    margin-left: 8px;
}
.track-menu-btn {
    width: 36px !important; height: 36px !important;
    font-size: 20px !important;
    opacity: .5 !important;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    display: flex; align-items: center; justify-content: center;
    padding: 0 !important;
}
.track-card.playing .track-card-title { color: var(--purple-300) !important; font-weight: 700 !important; }
.track-card.playing .track-card-artist { color: #d8b4fe !important; }
.track-card.playing::before {
    content: '▶';
    position: absolute;
    left: 32px; top: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px; color: #fff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .8), 0 0 10px rgba(0, 0, 0, .5);
    z-index: 10; pointer-events: none;
}
.track-card.playing .track-card-cover { filter: brightness(.6); }

/* ============ 9. МОЯ ВОЛНА ============ */
.wave-screen {
    position: relative;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    gap: 40px !important;
    overflow: hidden !important;
}
.wave-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    position: relative;
    z-index: 1;
}
.wave-header h2 {
    font-size: 34px; font-weight: 800;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
    letter-spacing: -.5px;
}
.wave-header p {
    font-size: 14px; color: var(--text-dark-mut);
    max-width: 260px; margin: 0 auto;
    line-height: 1.5;
    animation: pulseText 1.5s ease-in-out infinite alternate;
}
@keyframes pulseText { 0% { opacity: .5; } 100% { opacity: 1; } }

.wave-main-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    position: relative;
    z-index: 1;
    flex: 0 !important;
}
.wave-bg {
    position: absolute; inset: -10%;
    z-index: 0; pointer-events: none;
}
.wave-orb {
    position: absolute; border-radius: 50%;
    filter: blur(60px); opacity: .4;
    animation: floatOrb 8s ease-in-out infinite alternate;
}
.orb-1 { width: 250px; height: 250px; background: #8b5cf6; top: 10%; left: -20%; }
.orb-2 { width: 200px; height: 200px; background: #22d3ee; bottom: 20%; right: -10%; animation-delay: -3s; }
.orb-3 { width: 180px; height: 180px; background: #c084fc; top: 40%; left: 40%; animation-delay: -5s; }
@keyframes floatOrb {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(20px, -30px) scale(1.1); }
}
.wave-halo {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(139, 92, 246, .4) 0%, transparent 70%);
    border-radius: 50%; z-index: -1;
    opacity: 0; transition: opacity .5s ease;
    pointer-events: none;
}
.wave-halo.playing { opacity: 1; animation: haloPulse 4s ease-in-out infinite; }
@keyframes haloPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1);   opacity: .6; }
    50%      { transform: translate(-50%, -50%) scale(1.3); opacity: .9; }
}
.wave-play-btn {
    padding: 16px 36px !important;
    margin: 0 auto 30px auto !important;
    background: rgba(30, 20, 50, .6);
    border: 1px solid rgba(167, 139, 250, .4);
    color: #fff; border-radius: 50px;
    font-size: 18px; font-weight: 700;
    cursor: pointer;
    display: flex !important; align-items: center !important; justify-content: center !important;
    gap: 12px;
    transition: all .3s cubic-bezier(.175, .885, .32, 1.275);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .3), inset 0 0 20px rgba(167, 139, 250, .1);
    z-index: 2;
    animation: buttonBreathe 3s ease-in-out infinite alternate;
}
@keyframes buttonBreathe {
    0%   { box-shadow: 0 8px 32px rgba(0, 0, 0, .3), inset 0 0 20px rgba(167, 139, 250, .1); }
    100% { box-shadow: 0 8px 32px rgba(0, 0, 0, .3), inset 0 0 40px rgba(167, 139, 250, .4), 0 0 20px rgba(167, 139, 250, .2); }
}
.wave-play-btn.playing {
    animation: none;
    background: rgba(139, 92, 246, .2);
    border-color: var(--purple-300);
    box-shadow: 0 0 20px rgba(139, 92, 246, .4);
    color: var(--purple-300);
}
.wave-play-btn:active { transform: scale(.95); }
.wave-play-btn .wave-btn-svg {
    width: 22px; height: 22px;
    fill: currentColor;
    margin-right: 4px;
}
.wave-play-btn.playing .wave-btn-svg { fill: var(--purple-300); }

.wave-visualizer-wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative;
    z-index: 2;
    margin: 0 auto !important;
    width: 100% !important;
}
.wave-bars, .wave-reflection {
    display: flex !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
    margin: 0 !important;
}
.wave-bars { align-items: flex-end !important; height: 60px !important; }
.wave-reflection {
    align-items: flex-start !important;
    height: 30px !important;
    opacity: .3 !important;
    filter: blur(1px);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%) !important;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%) !important;
}
.wave-bar, .wave-bar-ref {
    width: 6px !important;
    height: 12px;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
    transition: height .08s ease-out !important;
}
.wave-bar {
    background: var(--grad-bar) !important;
    box-shadow: 0 0 10px rgba(34, 211, 238, .5) !important;
    opacity: .5;
}
.wave-bar-ref { background: var(--grad-bar) !important; }
.wave-bars.animating .wave-bar,
.wave-reflection.animating .wave-bar-ref {
    opacity: 1;
    animation: eqBar .6s ease-in-out infinite alternate;
}
.wave-bars.animating .wave-bar:nth-child(odd) { animation-duration: .4s; }
.wave-bars.animating .wave-bar:nth-child(3n)  { animation-duration: .8s; }
.wave-bars.animating .wave-bar:nth-child(4n)  { animation-duration: .6s; }
.wave-brand-text {
    font-size: 11px; letter-spacing: 6px;
    color: var(--text-dark-mut); text-transform: uppercase;
    font-weight: 600; margin-top: 10px;
}
.wave-loader {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 25%, #c084fc 100%);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
    animation: spinLoader 1s linear infinite;
    box-shadow: 0 0 30px rgba(192, 132, 252, 0.4);
    margin: 0 auto;
}
@keyframes spinLoader { 100% { transform: rotate(360deg); } }

/* ============ 10. ПЛЕЙЛИСТЫ ============ */
.playlists-page-content { padding: 0 12px !important; margin: 0 !important; }
.page-header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 16px !important;
    padding-left: 4px;
}
.page-header h1 {
    font-size: 26px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.page-header h1::before,
.page-header h1::after { display: none !important; }
.playlists-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 0 20px 0 !important;
}
.playlist-card {
    padding: 10px !important;
    border-radius: 14px !important;
    background: rgba(255, 255, 255, .03) !important;
    border: 1px solid rgba(255, 255, 255, .05) !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    position: relative;
}
.playlist-cover {
    width: 100% !important;
    aspect-ratio: 1 !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
    font-size: 40px !important;
}
.playlist-name {
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #fff !important;
    margin-bottom: 4px !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding-right: 20px;
}
.playlist-info {
    font-size: 11px !important;
    color: var(--text-dark-mut) !important;
    line-height: 1.3 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}
.playlist-menu-container {
    position: absolute !important;
    bottom: 8px !important; right: 8px !important;
}
.playlist-menu-btn {
    position: absolute;
    right: 8px; bottom: 8px;
    width: 32px !important; height: 32px !important;
    font-size: 20px !important;
    background: transparent !important;
    border: none !important;
    color: var(--text-dark-mut) !important;
    opacity: .8 !important;
    display: flex; align-items: center; justify-content: center;
    padding: 0 !important;
}
.create-new-card {
    display: flex; align-items: center; justify-content: center;
    border: 1px dashed rgba(138, 43, 226, .4) !important;
    background: rgba(138, 43, 226, .05) !important;
}
.create-new-card .playlist-cover {
    background: transparent !important;
    border: none !important;
    font-size: 36px !important;
}
.create-new-card .playlist-name {
    text-align: center;
    font-size: 14px !important;
    color: var(--purple-300) !important;
}

/* ============ 11. BOTTOM SHEET: ПЛЕЙЛИСТ + ПРОФИЛЬ ============ */
.playlist-dropdown,
#user-dropdown-menu {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    width: 100% !important;
    min-width: 100% !important;
    border-radius: 24px 24px 0 0 !important;
    background: var(--bg-sheet) !important;
    border: none !important;
    border-top: 1px solid rgba(138, 43, 226, .4) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .8) !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    animation: slideUpMobile .3s cubic-bezier(.175, .885, .32, 1.275);
}
.playlist-dropdown {
    padding: 16px 16px calc(24px + var(--safe-bottom)) !important;
    gap: 8px !important;
}
#user-dropdown-menu {
    padding: 16px 16px calc(20px + var(--safe-bottom)) !important;
    gap: 6px !important;
}
.playlist-dropdown.hidden,
#user-dropdown-menu.hidden { display: none !important; }
@keyframes slideUpMobile {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}
.playlist-dropdown .dropdown-item {
    padding: 16px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    background: rgba(255, 255, 255, .05) !important;
    border-radius: 14px !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .05) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}
.playlist-dropdown .dropdown-item.danger {
    color: var(--danger-text) !important;
    background: rgba(255, 107, 107, .1) !important;
    border-color: rgba(255, 107, 107, .2) !important;
}
.playlist-dropdown .dropdown-item span {
    font-size: 22px !important; margin: 0 !important;
}
#user-dropdown-menu #menu-user-email {
    text-align: center;
    font-size: 14px !important;
    color: var(--purple-300) !important;
    padding: 10px 0 20px !important;
    border-bottom: 1px solid rgba(138, 43, 226, .2) !important;
    margin-bottom: 10px !important;
    font-weight: 600;
}
#user-dropdown-menu .dropdown-item {
    padding: 16px 20px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    background: rgba(255, 255, 255, .04) !important;
    border-radius: 16px !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .03) !important;
    display: flex;
    align-items: center !important;
    gap: 16px !important;
    transition: .1s;
}
#user-dropdown-menu .dropdown-item:active {
    background: rgba(138, 43, 226, .2) !important;
    transform: scale(.98);
}
#user-dropdown-menu .dropdown-item span {
    font-size: 22px !important; margin: 0 !important;
}
#user-dropdown-menu .dropdown-item.danger {
    color: var(--danger-text) !important;
    background: rgba(255, 107, 107, .1) !important;
    border-color: rgba(255, 107, 107, .1) !important;
    margin-top: 10px;
}
#user-dropdown-menu hr { display: none !important; }

/* ============ 12. МОДАЛКИ-ШТОРКИ ============ */
:is(#add-to-playlist-modal, #playlist-modal) {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, .6) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity .3s ease, visibility .3s ease !important;
}
:is(#add-to-playlist-modal, #playlist-modal).hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
:is(#add-to-playlist-modal, #playlist-modal) > div:first-child {
    width: 100% !important;
    max-width: 100% !important;
    background: var(--bg-sheet) !important;
    border-radius: 24px 24px 0 0 !important;
    border-top: 1px solid rgba(138, 43, 226, .4) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .8) !important;
    overflow-y: auto !important;
    transform: translateY(0) !important;
    transition: transform .3s cubic-bezier(.175, .885, .32, 1.275) !important;
    padding: 20px 16px calc(20px + var(--safe-bottom)) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
:is(#add-to-playlist-modal, #playlist-modal).hidden > div:first-child {
    transform: translateY(100%) !important;
}
:is(#add-to-playlist-modal, #playlist-modal) h3 {
    text-align: center;
    color: #fff;
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 800;
}

/* Кнопки закрытия */
:is(#close-add-modal, #close-playlist-modal) {
    position: absolute !important;
    top: 16px !important; right: 16px !important;
    width: 36px !important; height: 36px !important;
    background: rgba(255, 255, 255, .1) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 0 !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0;
}
:is(#close-add-modal, #close-playlist-modal)::after {
    content: '✕';
    font-size: 16px !important;
    font-weight: bold !important;
    line-height: 1 !important;
    display: block !important;
}
#close-playlist-modal::after { font-size: 18px !important; }
:is(#close-add-modal, #close-playlist-modal):active {
    transform: scale(.9);
    background: rgba(255, 107, 107, .2) !important;
    color: var(--danger-text) !important;
}

/* Список плейлистов */
#add-to-playlist-modal ul,
#playlist-select-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#add-to-playlist-modal li {
    background: rgba(255, 255, 255, .05) !important;
    padding: 16px !important;
    border-radius: 14px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    cursor: pointer;
    transition: .2s;
    border: 1px solid rgba(255, 255, 255, .05) !important;
    display: flex;
    align-items: center;
}
#add-to-playlist-modal li:active {
    background: rgba(138, 43, 226, .3) !important;
    transform: scale(.98);
}
#create-new-playlist-from-add-btn {
    width: 100%;
    padding: 16px;
    background: rgba(138, 43, 226, .15) !important;
    color: var(--purple-300) !important;
    border: 1px dashed rgba(138, 43, 226, .5) !important;
    border-radius: 14px !important;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* ============ 13. ОЧЕРЕДЬ (справа) ============ */
#mobileQueueSheet {
    position: fixed !important;
    top: 0 !important; right: 0 !important; bottom: 0 !important;
    left: auto !important;
    height: 100dvh !important;
    width: 85vw !important;
    max-width: 360px !important;
    border-radius: 24px 0 0 24px !important;
    border-top: none !important;
    border-left: 1px solid rgba(138, 43, 226, .4) !important;
    box-shadow: -10px 0 40px rgba(0, 0, 0, .9) !important;
    background: var(--bg-dark) !important;
    transform: translateX(100%) !important;
    transition: transform .3s cubic-bezier(.175, .885, .32, 1.275) !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
}
#mobileQueueSheet.active { transform: translateX(0) !important; }
.mobile-queue-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 20px 16px !important;
    border-bottom: 1px solid rgba(255, 255, 255, .1) !important;
    flex-shrink: 0 !important;
}
.mobile-queue-header h3 {
    margin: 0 !important;
    font-size: 18px !important;
    color: #fff !important;
    font-weight: 700 !important;
}
#mobileQueueList {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 10px 16px !important;
    min-height: 200px;
}
.queue-section-title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--purple-300);
    font-weight: 800;
    margin: 16px 0 12px 4px;
}
.mobile-queue-item {
    display: flex !important;
    align-items: center !important;
    padding: 8px !important;
    gap: 12px !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: background 0.2s ease !important;
    cursor: pointer;
}
.mobile-queue-item:active {
    background: rgba(138, 43, 226, 0.2) !important;
    border-color: rgba(138, 43, 226, 0.4) !important;
}
.queue-item-cover {
    width: 44px; height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #1a0a2a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    image-rendering: -webkit-optimize-contrast;
}
.mobile-queue-item-info {
    flex: 1 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 4px !important;
}
.mobile-queue-item-title {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.mobile-queue-item-artist {
    color: var(--text-dark-mut) !important;
    font-size: 12px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.mobile-queue-action-btn {
    width: 32px !important; height: 32px !important;
    background: rgba(255, 255, 255, .1) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: .2s !important;
    flex-shrink: 0;
}
.mobile-queue-action-btn.remove {
    color: var(--danger) !important;
    background: rgba(255, 77, 77, .1) !important;
}
.mobile-queue-action-btn:active { transform: scale(.9) !important; }
.mobile-queue-action-btn.play-now {
    background: rgba(255, 255, 255, 0.1) !important;
}
.mobile-queue-item:active .mobile-queue-action-btn.play-now {
    background: var(--purple-300) !important;
}

/* ============ 14. АВТОРИЗАЦИЯ ============ */
body:has(#auth-container:not(.hidden)) :is(
    .mobile-bottom-nav, .mobile-mini-player, .mobile-player-container,
    .bottom-player, .menu-fab, header
) { display: none !important; }

.auth-container { padding: 16px; }
.auth-card { padding: 32px 20px; border-radius: 24px; max-width: 100%; }
.auth-icon { font-size: 40px; margin-bottom: 12px; }
.welcome-text { margin-bottom: 24px; }
.welcome-text .brand { font-size: 28px; }
.welcome-text span { font-size: 13px; }
.back-btn {
    position: absolute;
    top: 24px; left: 24px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0);
    border-radius: 50%;
    color: #fff; cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
    z-index: 10;
}
.input-container input {
    padding: 20px 14px 8px;
    font-size: 16px;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
}
.input-container input:-webkit-autofill,
.input-container input:-webkit-autofill:hover,
.input-container input:-webkit-autofill:focus,
.input-container input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    transition: background-color 5000s ease-in-out 0s;
}
.input-container label { font-size: 14px; left: 14px; }
.input-container input:focus + label,
.input-container input:not(:placeholder-shown) + label {
    top: 8px; font-size: 10px;
}
.primary-btn { padding: 16px; font-size: 15px; }
.secondary-btn { padding: 14px; font-size: 14px; }
.floating-notes span { font-size: 16px !important; }
.floating-notes span:nth-child(3) { font-size: 24px !important; }

/* ============ 15. СТРАНИЦА АРТИСТА ============ */
:is(.artist-page, .artist-page-content) {
    padding: 16px 12px 100px 12px !important;
    margin: 0 !important;
}
.artist-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 12px !important;
    margin-bottom: 24px !important;
}
.artist-avatar {
    width: 90px !important;
    height: 90px !important;
    font-size: 36px !important;
    margin-bottom: 8px !important;
}
.artist-info h1 { font-size: 24px; }
:is(.search-loading, .track-grid) { padding: 0 4px !important; }

/* ============ 16. МОБИЛЬНАЯ ШАПКА + ПОИСК ============ */
.mobile-app-header {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    position: absolute;
    top: 0; left: 0; right: 0;
    width: 100%;
    padding: calc(16px + var(--safe-top)) 16px 16px;
    background: transparent !important;
    z-index: 100;
    pointer-events: none;
    box-sizing: border-box;
}
.mobile-header-title {
    font-size: 22px;
    font-weight: 800;
    background: var(--grad-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    text-align: center;
    margin: 0 auto;
    max-width: 70vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mobile-header-search-btn {
    position: absolute;
    right: 16px;
    top: calc(12px + var(--safe-top));
    background: transparent !important;
    border: none !important;
    color: #fff;
    cursor: pointer;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
    pointer-events: auto;
    padding: 0;
}
.mobile-header-search-btn:active { transform: scale(0.85); opacity: 0.7; }
body:has(.wave-screen) .mobile-app-header { pointer-events: none; }

.mobile-search-wrapper {
    position: fixed;
    top: 0; left: 0; right: 0;
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: calc(10px + var(--safe-top)) 16px 10px;
    background: #0a0615;
    z-index: 1001;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
}
.mobile-search-wrapper.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}
.mobile-search-back-btn {
    background: transparent !important;
    border: none !important;
    color: #fff;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    padding: 0; cursor: pointer;
    flex-shrink: 0; transition: 0.2s;
}
.mobile-search-back-btn:active { transform: scale(0.85); opacity: 0.7; }
.mobile-search-input-container {
    flex: 1;
    display: flex; align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
}
#mobile-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    outline: none;
    width: 100%;
}
#mobile-search-input::placeholder { color: var(--text-dark-mut); }
#mobile-clear-search {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.search-history-container { padding: 16px 12px; }
.search-history-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px;
}
.search-history-title {
    color: var(--text-dark-mut);
    font-size: 14px; font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.search-history-clear-all {
    background: transparent; border: none;
    color: var(--purple-300);
    font-size: 13px; font-weight: 600;
    cursor: pointer;
}
.search-history-tags {
    display: flex; flex-wrap: wrap;
    gap: 8px;
}
.search-history-tag {
    display: flex; align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: 0.2s;
}
.search-history-tag:active {
    background: rgba(192, 132, 252, 0.2);
    border-color: var(--purple-300);
}
.search-history-tag-text { margin-right: 8px; }
.search-history-tag-remove {
    color: var(--text-dark-mut);
    font-size: 12px; padding: 2px;
    transition: 0.2s;
}
.search-history-tag-remove:hover { color: var(--danger-text); }

body:has(.mobile-search-wrapper.active) .mobile-bottom-nav { display: none !important; }
body:has(.mobile-search-wrapper.active) .mobile-mini-player {
    bottom: 12px !important;
    display: flex !important;
}
body:has(.mobile-search-wrapper.active) #content-view { padding-bottom: 100px !important; }

/* ============ 17. ИЗБРАННОЕ ============ */
.favorites-top-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
    background: linear-gradient(180deg, rgba(138, 43, 226, 0.15) 0%, transparent 100%) !important;
    border-radius: 20px !important;
    padding: 20px 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
}
.favorites-header {
    display: flex !important;
    align-items: flex-end !important;
    gap: 16px !important;
    position: relative !important;
    width: 100% !important;
    padding-bottom: 8px !important;
}
.fav-cover-large {
    width: 90px !important;
    height: 90px !important;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #a78bfa, #6b21a8) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4) !important;
}
.fav-cover-large .icon {
    width: 45px !important;
    height: 45px !important;
    color: #fff !important;
}
.fav-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    flex: 1 !important;
    min-width: 0 !important;
    padding-right: 55px !important;
}
.fav-type {
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    color: var(--purple-300) !important;
    font-weight: 700 !important;
}
.fav-info h1 {
    font-size: 24px !important;
    font-weight: 900 !important;
    color: #fff !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.5px !important;
    white-space: normal !important;
}
.fav-stats {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 13px !important;
    color: var(--text-dark-mut) !important;
    font-weight: 500 !important;
    margin-top: 2px !important;
}
.fav-play-btn {
    position: absolute !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: var(--purple-300) !important;
    border: none;
    color: #fff;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 6px 15px rgba(192, 132, 252, 0.4) !important;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    z-index: 10 !important;
}
.fav-play-btn .icon {
    width: 22px !important;
    height: 22px !important;
    margin-left: 3px !important;
}
.fav-play-btn:active { transform: scale(0.9); background: var(--purple-400); }

.fav-genres-container {
    display: block !important;
    width: 100% !important;
    margin-top: 8px !important;
    overflow: hidden !important;
}
.fav-genres {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    gap: 8px !important;
    margin-top: 4px;
    padding: 4px 0 8px 0 !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.fav-genres::-webkit-scrollbar { display: none !important; }

.genre-pill {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: none !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 30px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    outline: none !important;
    -webkit-appearance: none !important;
    transition: all 0.2s ease;
}
.genre-pill:active,
.genre-pill.active {
    background: var(--purple-300) !important;
    box-shadow: inset 0 0 0 1px var(--purple-300) !important;
    color: #fff !important;
}

/* ============ 18. ИСТОРИЯ / НАСТРОЙКИ (шторки) ============ */
:is(#history-modal, #settings-modal) {
    z-index: 99999 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, .6) !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity .3s ease, visibility .3s ease !important;
}
:is(#history-modal, #settings-modal).hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
:is(#history-modal .history-modal-content, #settings-modal .settings-modal-content) {
    width: 100% !important;
    max-width: 100% !important;
    background: var(--bg-sheet) !important;
    border-radius: 24px 24px 0 0 !important;
    border-top: 1px solid rgba(138, 43, 226, .4) !important;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, .8) !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    transform: translateY(0) !important;
    transition: transform .3s cubic-bezier(.175, .885, .32, 1.275) !important;
    padding: 20px 16px calc(20px + var(--safe-bottom)) !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}
:is(#history-modal, #settings-modal).hidden :is(.history-modal-content, .settings-modal-content) {
    transform: translateY(100%) !important;
}
.history-modal-footer {
    margin-top: auto !important;
    padding-top: 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    display: flex !important;
    gap: 12px !important;
    flex-shrink: 0 !important;
}
#settings-modal .settings-modal-header {
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}
#settings-modal .settings-modal-header h3 {
    font-size: 20px !important;
    color: #fff !important;
}

/* ============ 19. СКРЫТЬ ГОРЯЧИЕ КЛАВИШИ В НАСТРОЙКАХ ============ */
#settings-modal .settings-section:has(#open-hotkeys-modal) {
    display: none !important;
}

/* ============ 20. ИКОНКИ ============ */
:is(.fa-solid, .fa-regular) { font-size: 1.1em; line-height: 1; }
:is(.mini-like-btn.liked i, #mobileLikeBtn i.fa-solid) { color: #ff4d6d; }

.player-control-btn i          { font-size: 22px; }
.player-control-btn.play-btn i { font-size: 28px; }
.player-action-item i          { font-size: 20px; }
.player-header-btn i           { font-size: 18px; }
.mini-player-btn i,
.mini-player-btn.play-btn i    { font-size: 18px; }

.icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.mini-player-btn .icon             { width: 20px; height: 20px; }
.player-control-btn .icon          { width: 28px; height: 28px; }
.player-control-btn.play-btn .icon { width: 36px; height: 36px; }
.player-header-btn .icon           { width: 24px; height: 24px; }
.player-action-item .icon          { width: 24px; height: 24px; }
.nav-icon .icon                    { width: 24px; height: 24px; }
.icon-btn .icon                    { width: 20px; height: 20px; }
.dropdown-item .icon               { width: 20px; height: 20px; margin-right: 8px; color: var(--text-dark-mut); }
.sidebar-nav-btn .icon             { width: 24px; height: 24px; margin-bottom: 4px; }

.heart-btn .icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}
.heart-btn.liked .icon { color: #ff4d6d !important; }
.heart-btn.liked .icon path {
    fill: #ff4d6d !important;
    stroke: #ff4d6d !important;
}

/* ============ 21. ТАЧ-ЭФФЕКТЫ ============ */
:is(.player-control-btn:active, .mini-player-btn:active,
    .nav-item:active, .player-action-item:active) {
    transform: scale(0.9) !important;
    transition: transform 0.1s ease !important;
}
@media (hover: none) and (pointer: coarse) {
    :is(.icon-btn, .player-btn, .player-action-btn, .panel-nav-btn,
        .dropdown-item, .track-menu-btn, .queue-action-btn, .history-action-btn) {
        min-height: 44px;
        min-width: 44px;
    }
    .track-card:hover { transform: none; }
    .track-menu-btn { opacity: .7; }
    .history-action-btn { opacity: .7; }
}
:is(.modal-content, .floating-panel, .queue-list, .history-list-container,
    .lyrics-content, .main-content) { -webkit-overflow-scrolling: touch; }

/* ============ 22. TOAST ============ */
.toast {
    bottom: 150px !important;
    font-size: 13px;
    padding: 10px 20px;
}

/* ============ 23. ОБЩИЕ ПЕРЕКЛЮЧАТЕЛИ (обе темы) ============ */
.similar-toggle {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-dark-mut);
    padding: 6px 12px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
    cursor: pointer; transition: 0.2s;
}
.similar-toggle.active {
    background: rgba(192, 132, 252, 0.15);
    border-color: var(--purple-300);
    color: var(--purple-300);
}
.similar-toggle:active { transform: scale(0.95); }

.stream-pill {
    display: flex; align-items: center; gap: 8px;
    background: rgba(192, 132, 252, 0.15);
    border: 1px solid rgba(192, 132, 252, 0.3);
    padding: 6px 12px; border-radius: 20px;
    max-width: 65vw;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.stream-pill span {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: 13px; color: #fff; font-weight: 600;
}
.stream-pill button {
    background: rgba(255, 255, 255, 0.1); border: none; color: var(--text-dark-mut);
    cursor: pointer; width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; transition: 0.2s; flex-shrink: 0; padding: 0;
    position: relative; z-index: 100 !important;
    pointer-events: auto !important;
}
.stream-pill button:active {
    background: var(--danger-text); color: #fff; transform: scale(0.9);
}

/* ============ 24. СВАЙП-ПЛАШКИ ============ */
.swipe-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    border-radius: 10px;
}
.swipe-indicator span {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.swipe-indicator.active svg {
    animation: popIcon 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIcon {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.delete-indicator {
    right: 0;
    background: var(--danger);
    color: #fff;
}
.queue-indicator {
    left: 0;
    background: var(--purple-300);
    color: #fff;
}

/* Инвертированный режим (swipe-reversed) */
.swipe-wrapper.swipe-reversed .delete-indicator { left: 0;  right: auto; }
.swipe-wrapper.swipe-reversed .queue-indicator  { right: 0; left: auto; }

/* ============ 25. ТЕКСТ ПЕСНИ (полноэкранный) ============ */
#lyrics-modal {
    background: rgba(10, 5, 21, 0.85) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 99999 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
}
#lyrics-modal.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
#lyrics-modal > div:first-child {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}
#lyrics-modal .lyrics-modal-header {
    padding: calc(16px + var(--safe-top)) 20px 16px !important;
    background: transparent !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}
#lyrics-modal h3 {
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin: 0 !important;
    font-weight: 700 !important;
}
#close-lyrics-modal {
    position: absolute;
    top: 20px; right: 20px;
    width: 36px; height: 36px;
    background: rgba(255, 255, 255, .1) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: .2s;
}
#close-lyrics-modal:active {
    transform: scale(.9);
    background: rgba(255, 107, 107, .2) !important;
    color: var(--danger-text) !important;
}
#lyrics-content {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 10vh 20px 40vh 20px !important;
    display: block !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
#lyrics-content::-webkit-scrollbar { display: none !important; }
.lyrics-line {
    font-size: 24px !important;
    font-weight: 800 !important;
    line-height: 1.4 !important;
    color: rgba(255, 255, 255, 0.3) !important;
    text-align: center !important;
    margin-bottom: 24px !important;
    transition: color 0.3s ease, opacity 0.3s ease !important;
    cursor: pointer;
}
.lyrics-line.active {
    color: var(--purple-300) !important;
    opacity: 1 !important;
    text-shadow: 0 0 15px rgba(192, 132, 252, 0.5) !important;
}
#lyrics-content .lyrics-error,
#lyrics-content .lyrics-loading {
    font-size: 16px !important;
    color: var(--text-dark-mut) !important;
    background: rgba(255, 255, 255, .03) !important;
    padding: 20px 30px !important;
    border-radius: 16px !important;
    border: 1px dashed rgba(255, 255, 255, .1) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
}

/* ============ 26. ТАЙМЕР СНА ============ */
#sleep-timer-modal {
    z-index: 999999 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.7) !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: fixed !important;
    inset: 0 !important;
}
#sleep-timer-modal.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}
#sleep-timer-modal .sleep-timer-content {
    width: 100% !important;
    max-width: 100% !important;
    background: var(--bg-dark) !important;
    border-radius: 24px 24px 0 0 !important;
    border-top: 1px solid rgba(138, 43, 226, 0.4) !important;
    padding: 24px 20px calc(24px + var(--safe-bottom)) !important;
    transform: translateY(0) !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#sleep-timer-modal.hidden .sleep-timer-content {
    transform: translateY(100%) !important;
}
.sleep-timer-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.sleep-timer-header h3 {
    margin: 0;
    color: var(--purple-300);
    font-size: 20px;
}
.sleep-timer-dial-container {
    position: relative;
    width: 260px;
    height: 260px;
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
#sleep-timer-dial {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
    z-index: 1;
}
#sleep-timer-dial:active { cursor: grabbing; }
.sleep-timer-dial-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 2;
}
#sleep-timer-value {
    font-size: 64px !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    line-height: 1 !important;
    letter-spacing: -2px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.sleep-timer-unit {
    font-size: 13px !important;
    color: var(--text-dark-mut) !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-top: 8px;
}
.sleep-timer-actions {
    width: 100%;
    padding: 0 20px;
    margin-top: 10px;
}
#sleep-timer-start {
    width: 100% !important;
    padding: 18px !important;
    border-radius: 16px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    background: linear-gradient(135deg, #c084fc, #6b21a8) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(138, 43, 226, 0.4) !important;
    transition: transform 0.2s !important;
}
#sleep-timer-start:active { transform: scale(0.95) !important; }

/* ============ 27. СОРТИРОВКА ============ */
.sort-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-dark-mut);
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.sort-btn:active { background: rgba(255,255,255,0.1); }
.sort-dropdown {
    position: absolute;
    top: 100%; right: 0;
    background: var(--bg-sheet);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
    min-width: 160px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-top: 8px;
}
.sort-dropdown button {
    background: transparent;
    border: none;
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}
.sort-dropdown button:active { background: rgba(138,43,226,0.3); }

/* ============ 28. СВЕТЛАЯ ТЕМА «LAVENDER DAYLIGHT» ============ */
:is([data-theme="light"], body.light-theme) {
    background-color: var(--bg-light);
    color: var(--text-light);
}
:is([data-theme="light"], body.light-theme) :is(#app-container, .app-layout) {
    background:
        radial-gradient(circle at 15% 10%, rgba(167, 139, 250, 0.32), transparent 55%),
        radial-gradient(circle at 85% 90%, rgba(103, 232, 249, 0.24), transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(192, 132, 252, 0.10), transparent 65%),
        linear-gradient(180deg, #faf6ff 0%, var(--bg-light) 50%, #e8dff5 100%);
}
:is([data-theme="light"], body.light-theme) :is(.main-content, #content-view) {
    background: transparent;
    color: var(--text-light);
}

/* --- Навигация --- */
:is([data-theme="light"], body.light-theme) .mobile-bottom-nav {
    background: rgba(250, 247, 255, 0.94) !important;
    border-top: 1px solid rgba(139, 92, 246, 0.15) !important;
    box-shadow: 0 -4px 22px rgba(139, 92, 246, 0.08);
}
:is([data-theme="light"], body.light-theme) .nav-item { color: #7a6a98; }
:is([data-theme="light"], body.light-theme) .nav-item.active { color: var(--purple-600); }
:is([data-theme="light"], body.light-theme) .nav-item.active .nav-icon {
    filter: drop-shadow(0 0 8px rgba(124, 58, 237, 0.45));
}

/* --- Мини-плеер --- */
:is([data-theme="light"], body.light-theme) .mobile-mini-player {
    background: linear-gradient(135deg,
        rgba(252, 250, 255, 0.97) 0%,
        rgba(246, 242, 255, 0.97) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
    border-top: 1px solid rgba(139, 92, 246, 0.22) !important;
    box-shadow:
        0 10px 30px rgba(139, 92, 246, 0.15),
        0 2px 8px rgba(124, 58, 237, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
:is([data-theme="light"], body.light-theme) .mini-player-progress {
    background: rgba(139, 92, 246, 0.18);
}
:is([data-theme="light"], body.light-theme) .mini-player-progress-fill {
    background: linear-gradient(90deg, #a78bfa, #c084fc);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}
:is([data-theme="light"], body.light-theme) .mini-player-progress-fill::after {
    background: #fff;
    border: 2px solid var(--purple-500);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.7);
}
:is([data-theme="light"], body.light-theme) .mini-player-cover {
    background: linear-gradient(135deg, #e6ddf7, #ede5fb);
    border: 1px solid rgba(139, 92, 246, 0.15);
}
:is([data-theme="light"], body.light-theme) .mini-player-title { color: #2a1a48; }
:is([data-theme="light"], body.light-theme) .mini-player-artist { color: var(--text-light-mut); }
:is([data-theme="light"], body.light-theme) .mini-player-btn { color: var(--text-light) !important; }
:is([data-theme="light"], body.light-theme) .mini-player-btn:active { color: var(--purple-600); }
:is([data-theme="light"], body.light-theme) .mini-player-btn.play-btn {
    color: #fff !important;
    background: var(--grad-button);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}
:is([data-theme="light"], body.light-theme) :is(.mini-like-btn.liked, .mini-like-btn.liked i) {
    color: #ff4d6d !important;
}

/* --- Полноэкранный плеер --- */
:is([data-theme="light"], body.light-theme) .fullscreen-player {
    background:
        radial-gradient(circle at 15% 10%, rgba(167, 139, 250, 0.32), transparent 55%),
        radial-gradient(circle at 85% 90%, rgba(103, 232, 249, 0.24), transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(192, 132, 252, 0.10), transparent 65%),
        linear-gradient(180deg, #faf6ff 0%, var(--bg-light) 50%, #e8dff5 100%);
    color: var(--text-light);
}
:is([data-theme="light"], body.light-theme) .player-bg-blur {
    background:
        radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.35), transparent 55%),
        radial-gradient(circle at 70% 80%, rgba(34, 211, 238, 0.25), transparent 55%);
    filter: blur(40px);
}
:is([data-theme="light"], body.light-theme) .player-drag-handle {
    background: linear-gradient(90deg, #a78bfa, var(--cyan-400));
    opacity: .6;
}
:is([data-theme="light"], body.light-theme) .player-header-btn {
    background: rgba(139, 92, 246, 0.10);
    color: #2a1a48 !important;
}
:is([data-theme="light"], body.light-theme) .player-header-btn:active {
    background: rgba(139, 92, 246, 0.22);
}
:is([data-theme="light"], body.light-theme) .player-header-title { color: #7a6a98; }

:is([data-theme="light"], body.light-theme) .player-artwork {
    background: linear-gradient(135deg, #e6ddf7, #ede5fb);
    box-shadow:
        0 30px 60px rgba(124, 58, 237, 0.20),
        0 0 60px rgba(103, 232, 249, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
:is([data-theme="light"], body.light-theme) .player-artwork.playing {
    box-shadow:
        0 20px 40px rgba(124, 58, 237, 0.28),
        0 0 80px rgba(139, 92, 246, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
:is([data-theme="light"], body.light-theme) .vinyl-record {
    background: repeating-radial-gradient(circle, #2a1a48 0%, var(--text-light) 2%, #2a1a48 4%);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4), 0 0 30px rgba(124, 58, 237, 0.15);
}
:is([data-theme="light"], body.light-theme) .vinyl-center {
    background: linear-gradient(135deg, #a78bfa, var(--cyan-400));
    border-color: #faf6ff;
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.55);
}
:is([data-theme="light"], body.light-theme) .player-track-title-full {
    color: #2a1a48;
    text-shadow: 0 2px 10px rgba(124, 58, 237, 0.12);
}
:is([data-theme="light"], body.light-theme) .player-track-artist-full { color: var(--text-light-mut); }
:is([data-theme="light"], body.light-theme) .player-title-menu-btn { color: var(--text-light-mut); }
:is([data-theme="light"], body.light-theme) .player-title-menu-btn:active {
    background: rgba(139, 92, 246, 0.12);
    color: var(--purple-600);
}

:is([data-theme="light"], body.light-theme) .progress-bar-full {
    background: rgba(139, 92, 246, 0.18);
}
:is([data-theme="light"], body.light-theme) .progress-fill-full {
    background: linear-gradient(90deg, #a78bfa, #c084fc);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.45);
}
:is([data-theme="light"], body.light-theme) .progress-knob {
    background: var(--purple-500);
    border: 2px solid #faf6ff;
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}
:is([data-theme="light"], body.light-theme) .progress-times { color: var(--text-light-mut); }

:is([data-theme="light"], body.light-theme) .player-control-btn { color: #2a1a48; }
:is([data-theme="light"], body.light-theme) .player-control-btn:active { color: var(--purple-600); }
:is([data-theme="light"], body.light-theme) .player-control-btn.play-btn {
    background: var(--grad-button);
    color: #fff;
    box-shadow: 0 8px 22px rgba(139, 92, 246, 0.45);
}
:is([data-theme="light"], body.light-theme) .player-control-btn.play-btn:active {
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.6);
}
:is([data-theme="light"], body.light-theme) .player-control-btn.play-btn:disabled {
    background: #dcd3ed !important;
    color: #8a7aa8 !important;
    box-shadow: none !important;
}

:is([data-theme="light"], body.light-theme) .player-action-item { color: var(--text-light-mut); }
:is([data-theme="light"], body.light-theme) .player-action-item span:first-child {
    color: #2a1a48;
    background: rgba(139, 92, 246, 0.10);
}
:is([data-theme="light"], body.light-theme) .player-action-item:active span:first-child {
    background: rgba(139, 92, 246, 0.25);
    color: var(--purple-600);
}
:is([data-theme="light"], body.light-theme) .player-action-item.active { color: var(--purple-600); }
:is([data-theme="light"], body.light-theme) .player-action-item.active span:first-child {
    color: var(--purple-600);
    background: rgba(139, 92, 246, 0.18);
}

/* --- Список треков --- */
:is([data-theme="light"], body.light-theme) .track-card {
    background: var(--bg-light-card) !important;
}
:is([data-theme="light"], body.light-theme) .track-card:active {
    background: rgba(139, 92, 246, 0.10) !important;
}
:is([data-theme="light"], body.light-theme) .track-card.playing {
    background: rgba(139, 92, 246, 0.13) !important;
}
:is([data-theme="light"], body.light-theme) .track-card-title { color: #2a1a48 !important; }
:is([data-theme="light"], body.light-theme) .track-card-artist { color: var(--text-light-mut) !important; }
:is([data-theme="light"], body.light-theme) .track-card.playing .track-card-title {
    color: var(--purple-600) !important;
}
:is([data-theme="light"], body.light-theme) .track-card.playing .track-card-artist {
    color: #9333ea !important;
}
:is([data-theme="light"], body.light-theme) .track-card.playing::before {
    color: var(--purple-600);
    text-shadow:
        0 2px 6px rgba(250, 246, 255, 0.95),
        0 0 10px rgba(124, 58, 237, 0.4);
}
:is([data-theme="light"], body.light-theme) .track-card.playing .track-card-cover {
    filter: brightness(0.95) saturate(1.15);
    box-shadow:
        0 0 0 2px var(--purple-500),
        0 2px 8px rgba(124, 58, 237, 0.3) !important;
}
:is([data-theme="light"], body.light-theme) .track-menu-btn { color: var(--text-light-mut) !important; }

/* --- Плейлисты --- */
:is([data-theme="light"], body.light-theme) .playlist-card {
    background: linear-gradient(135deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(248, 244, 255, 0.85) 100%) !important;
    border: 1px solid rgba(139, 92, 246, 0.12) !important;
    box-shadow:
        0 4px 16px rgba(124, 58, 237, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
:is([data-theme="light"], body.light-theme) .playlist-name { color: #2a1a48 !important; }
:is([data-theme="light"], body.light-theme) .playlist-info { color: var(--text-light-mut) !important; }
:is([data-theme="light"], body.light-theme) .playlist-menu-btn { color: var(--text-light-mut) !important; }
:is([data-theme="light"], body.light-theme) .create-new-card {
    background: rgba(139, 92, 246, 0.05) !important;
    border: 2px dashed rgba(139, 92, 246, 0.35) !important;
}
:is([data-theme="light"], body.light-theme) .create-new-card .playlist-name {
    color: var(--purple-600) !important;
}

/* --- Шторки / модалки / меню --- */
:is([data-theme="light"], body.light-theme) :is(
    .mobile-player-dropdown,
    .playlist-dropdown,
    #user-dropdown-menu,
    #mobileQueueSheet,
    .modal-content,
    #add-to-playlist-modal > div:first-child,
    #playlist-modal > div:first-child,
    #history-modal .history-modal-content,
    #settings-modal .settings-modal-content
) {
    background: linear-gradient(135deg,
        rgba(252, 250, 255, 0.98) 0%,
        rgba(246, 242, 255, 0.98) 100%) !important;
    border-top: 1px solid rgba(139, 92, 246, 0.22) !important;
    box-shadow:
        0 -10px 40px rgba(124, 58, 237, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
:is([data-theme="light"], body.light-theme) #mobileQueueSheet {
    border-left-color: rgba(139, 92, 246, 0.22) !important;
    border-top: none !important;
    box-shadow: -10px 0 40px rgba(124, 58, 237, 0.18) !important;
}
:is([data-theme="light"], body.light-theme) :is(
    .dropdown-item,
    .mobile-queue-item,
    .mobile-player-dropdown .dropdown-item,
    #user-dropdown-menu .dropdown-item
) {
    background: rgba(139, 92, 246, 0.06) !important;
    color: #2a1a48 !important;
    border: 1px solid rgba(139, 92, 246, 0.10) !important;
}
:is([data-theme="light"], body.light-theme) .mobile-player-dropdown .dropdown-item:hover {
    background: rgba(139, 92, 246, 0.14) !important;
    color: var(--purple-600) !important;
}
:is([data-theme="light"], body.light-theme) :is(
    .mobile-queue-header h3,
    .mobile-queue-item-title,
    #lyrics-modal h3,
    #playlist-modal h3,
    #add-to-playlist-modal h3,
    #settings-modal h3,
    #settings-modal h4
) { color: #2a1a48 !important; }
:is([data-theme="light"], body.light-theme) .mobile-queue-item-artist { color: var(--text-light-mut) !important; }
:is([data-theme="light"], body.light-theme) .mobile-queue-header {
    border-bottom-color: rgba(139, 92, 246, 0.15) !important;
}
:is([data-theme="light"], body.light-theme) .mobile-queue-item:active {
    background: rgba(139, 92, 246, 0.18) !important;
    border-color: rgba(139, 92, 246, 0.35) !important;
}
:is([data-theme="light"], body.light-theme) .mobile-queue-action-btn {
    background: rgba(139, 92, 246, 0.12) !important;
    color: var(--purple-600) !important;
}
:is([data-theme="light"], body.light-theme) .mobile-queue-action-btn.remove {
    background: rgba(255, 77, 109, 0.12) !important;
    color: #d92348 !important;
}
:is([data-theme="light"], body.light-theme) .mobile-queue-item:active .mobile-queue-action-btn.play-now {
    background: var(--grad-button) !important;
    color: #fff !important;
}
:is([data-theme="light"], body.light-theme) #add-to-playlist-modal li {
    background: rgba(139, 92, 246, 0.06) !important;
    color: #2a1a48 !important;
    border-color: rgba(139, 92, 246, 0.10) !important;
}
:is([data-theme="light"], body.light-theme) #add-to-playlist-modal li:active {
    background: rgba(139, 92, 246, 0.22) !important;
}
:is([data-theme="light"], body.light-theme) #create-new-playlist-from-add-btn {
    background: rgba(139, 92, 246, 0.08) !important;
    color: var(--purple-600) !important;
    border-color: rgba(139, 92, 246, 0.45) !important;
}

/* --- Текст песни (light) --- */
:is([data-theme="light"], body.light-theme) .lyrics-line {
    color: rgba(61, 44, 92, 0.35) !important;
}
:is([data-theme="light"], body.light-theme) .lyrics-line.active {
    color: var(--purple-600) !important;
    text-shadow: 0 0 15px rgba(124, 58, 237, 0.35) !important;
}

/* --- Инпуты --- */
:is([data-theme="light"], body.light-theme) input {
    background: rgba(139, 92, 246, 0.05) !important;
    color: #2a1a48 !important;
    border-color: rgba(139, 92, 246, 0.20) !important;
}
:is([data-theme="light"], body.light-theme) input::placeholder { color: #9a8ab0 !important; }
:is([data-theme="light"], body.light-theme) input:focus {
    border-color: var(--purple-500) !important;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18) !important;
}

/* --- Волна (light) --- */
:is([data-theme="light"], body.light-theme) .wave-header h2 {
    background: linear-gradient(135deg, var(--purple-600) 0%, var(--cyan-600) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(124, 58, 237, 0.20));
}
:is([data-theme="light"], body.light-theme) .wave-header p { color: var(--text-light-mut); }
:is([data-theme="light"], body.light-theme) .wave-play-btn {
    background: linear-gradient(135deg,
        rgba(252, 250, 255, 0.85) 0%,
        rgba(246, 242, 255, 0.85) 100%);
    color: #2a1a48;
    border-color: rgba(139, 92, 246, 0.40);
    box-shadow:
        0 8px 32px rgba(124, 58, 237, 0.15),
        inset 0 0 20px rgba(167, 139, 250, 0.15);
}
:is([data-theme="light"], body.light-theme) .wave-play-btn.playing {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(34, 211, 238, 0.15));
    border-color: var(--purple-500);
    color: var(--purple-600);
    box-shadow:
        0 0 24px rgba(139, 92, 246, 0.35),
        inset 0 0 20px rgba(167, 139, 250, 0.15);
}
:is([data-theme="light"], body.light-theme) .wave-play-btn.playing .wave-btn-svg { fill: var(--purple-600); }
:is([data-theme="light"], body.light-theme) .wave-brand-text { color: var(--text-light-mut); }
:is([data-theme="light"], body.light-theme) .wave-orb { opacity: 0.55; }
:is([data-theme="light"], body.light-theme) .orb-1 { background: var(--purple-500); }
:is([data-theme="light"], body.light-theme) .orb-2 { background: var(--cyan-400); }
:is([data-theme="light"], body.light-theme) .orb-3 { background: var(--purple-300); }
:is([data-theme="light"], body.light-theme) .wave-halo {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.35) 0%, transparent 70%);
}
:is([data-theme="light"], body.light-theme) .wave-bar {
    background: var(--grad-bar-lt) !important;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.35) !important;
    opacity: 0.7;
}
:is([data-theme="light"], body.light-theme) .wave-bar-ref {
    background: var(--grad-bar-lt) !important;
    opacity: 0.5;
}

/* --- Шапка + поиск (light) --- */
:is([data-theme="light"], body.light-theme) .mobile-header-title {
    background: linear-gradient(135deg, var(--purple-600), var(--cyan-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(124, 58, 237, 0.15));
}
:is([data-theme="light"], body.light-theme) .mobile-header-search-btn {
    background: rgba(139, 92, 246, 0.10) !important;
    color: var(--purple-600) !important;
    border-radius: 50%;
}
:is([data-theme="light"], body.light-theme) .mobile-search-wrapper {
    background:
        radial-gradient(circle at 20% 50%, rgba(167, 139, 250, 0.18), transparent 60%),
        #f5f0ff;
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}
:is([data-theme="light"], body.light-theme) .mobile-search-back-btn { color: #2a1a48; }
:is([data-theme="light"], body.light-theme) .mobile-search-input-container {
    background: rgba(139, 92, 246, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.15);
}
:is([data-theme="light"], body.light-theme) #mobile-search-input { color: #2a1a48; }
:is([data-theme="light"], body.light-theme) #mobile-search-input::placeholder { color: #9a8ab0; }
:is([data-theme="light"], body.light-theme) #mobile-clear-search {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple-600);
}
:is([data-theme="light"], body.light-theme) .search-history-title { color: var(--text-light-mut); }
:is([data-theme="light"], body.light-theme) .search-history-clear-all { color: var(--purple-600); }
:is([data-theme="light"], body.light-theme) .search-history-tag {
    background: rgba(139, 92, 246, 0.07);
    border-color: rgba(139, 92, 246, 0.15);
    color: #2a1a48;
}
:is([data-theme="light"], body.light-theme) .search-history-tag:active {
    background: rgba(139, 92, 246, 0.20);
    border-color: var(--purple-500);
}
:is([data-theme="light"], body.light-theme) .search-history-tag-remove { color: var(--text-light-mut); }

/* --- Кнопки закрытия (light) --- */
:is([data-theme="light"], body.light-theme) :is(
    #close-playlist-modal,
    #close-add-modal,
    #close-lyrics-modal,
    .mobile-queue-header button
) {
    color: #2a1a48 !important;
    background: rgba(139, 92, 246, 0.12) !important;
}
:is([data-theme="light"], body.light-theme) :is(
    #close-playlist-modal, #close-add-modal, #close-lyrics-modal
)::after { color: #2a1a48 !important; }
:is([data-theme="light"], body.light-theme) :is(
    #close-playlist-modal:active,
    #close-add-modal:active,
    #close-lyrics-modal:active
) {
    background: rgba(255, 77, 109, 0.20) !important;
    color: #d92348 !important;
}

/* --- Профиль --- */
:is([data-theme="light"], body.light-theme) #user-dropdown-menu #menu-user-email {
    color: var(--purple-600) !important;
    border-bottom-color: rgba(139, 92, 246, 0.15) !important;
}
:is([data-theme="light"], body.light-theme) #user-dropdown-menu .dropdown-item.danger {
    background: rgba(255, 77, 109, 0.10) !important;
    color: #d92348 !important;
    border-color: rgba(255, 77, 109, 0.15) !important;
}

/* --- Toasts + иконки меню --- */
:is([data-theme="light"], body.light-theme) .toast {
    background: rgba(42, 26, 72, 0.94) !important;
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35) !important;
}
:is([data-theme="light"], body.light-theme) .dropdown-item .icon { color: var(--text-light-mut); }

/* --- Избранное --- */
:is([data-theme="light"], body.light-theme) .favorites-top-wrapper {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.14) 0%, transparent 100%) !important;
}
:is([data-theme="light"], body.light-theme) .fav-cover-large {
    background: linear-gradient(135deg, #a78bfa, var(--purple-600)) !important;
    box-shadow: 0 10px 28px rgba(124, 58, 237, 0.35) !important;
}
:is([data-theme="light"], body.light-theme) .fav-info h1 { color: #2a1a48 !important; }
:is([data-theme="light"], body.light-theme) .fav-type { color: var(--purple-600) !important; }
:is([data-theme="light"], body.light-theme) .fav-stats { color: var(--text-light-mut) !important; }
:is([data-theme="light"], body.light-theme) .genre-pill {
    background: rgba(139, 92, 246, 0.08) !important;
    box-shadow: inset 0 0 0 1.5px rgba(139, 92, 246, 0.20) !important;
    color: #2a1a48 !important;
}
:is([data-theme="light"], body.light-theme) .genre-pill:active,
:is([data-theme="light"], body.light-theme) .genre-pill.active {
    background: linear-gradient(135deg, #a78bfa, var(--purple-600)) !important;
    box-shadow: inset 0 0 0 1.5px transparent !important;
    color: #fff !important;
}
:is([data-theme="light"], body.light-theme) .fav-play-btn {
    background: var(--grad-button) !important;
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.45) !important;
}

/* --- Артист --- */
:is([data-theme="light"], body.light-theme) .artist-info h1 { color: #2a1a48; }
:is([data-theme="light"], body.light-theme) .artist-avatar {
    background: linear-gradient(135deg, #e6ddf7, #ede5fb) !important;
    color: var(--purple-600) !important;
}

/* --- Настройки / История --- */
:is([data-theme="light"], body.light-theme) #settings-modal .settings-modal-header {
    border-bottom-color: rgba(139, 92, 246, 0.12) !important;
}
:is([data-theme="light"], body.light-theme) .history-modal-footer {
    border-top-color: rgba(139, 92, 246, 0.12) !important;
}

/* --- Похожие / Поток --- */
:is([data-theme="light"], body.light-theme) .similar-toggle {
    background: rgba(139, 92, 246, 0.07);
    border-color: rgba(139, 92, 246, 0.18);
    color: var(--text-light-mut);
}
:is([data-theme="light"], body.light-theme) .similar-toggle.active {
    background: rgba(139, 92, 246, 0.18);
    border-color: var(--purple-500);
    color: var(--purple-600);
    box-shadow: 0 2px 10px rgba(124, 58, 237, 0.20);
}
:is([data-theme="light"], body.light-theme) .stream-pill {
    background: rgba(139, 92, 246, 0.10);
    border-color: rgba(139, 92, 246, 0.28);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.12);
}
:is([data-theme="light"], body.light-theme) .stream-pill span { color: #2a1a48; }
:is([data-theme="light"], body.light-theme) .stream-pill button {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple-600);
}
:is([data-theme="light"], body.light-theme) .stream-pill button:active {
    background: #d92348;
    color: #fff;
}

/* --- Sleep timer (light) --- */
:is([data-theme="light"], body.light-theme) #sleep-timer-modal .sleep-timer-content {
    background: var(--bg-sheet-light) !important;
    border-top-color: rgba(139, 92, 246, 0.22) !important;
}
:is([data-theme="light"], body.light-theme) #sleep-timer-value { color: #2a1a48 !important; }
:is([data-theme="light"], body.light-theme) .sleep-timer-unit { color: var(--text-light-mut) !important; }

/* ============ 29. ОТКЛЮЧЕНИЕ BLUR (финальный слой) ============ */
:is(
    .mobile-mini-player,
    .mobile-bottom-nav,
    #mobileQueueSheet,
    #settings-modal .settings-modal-content,
    #history-modal .history-modal-content,
    .modal-content,
    #user-dropdown-menu,
    .mobile-player-dropdown,
    .fullscreen-player,
    .mobile-search-wrapper,
    .playlist-dropdown,
    #sleep-timer-modal .sleep-timer-content
) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* ============ 30. АДАПТИВ ============ */
@media (max-width: 480px) {
    .track-grid { gap: 12px; }
    .track-card { padding: 10px; }
    .track-card-title { font-size: 13px; }
    .track-card-artist { font-size: 11px; }
    .modal-content { width: 95%; padding: 20px 16px; }
    .wave-header h2 { font-size: 28px; }
    .wave-header p { font-size: 13px; }
    .wave-bars { gap: 6px; height: 50px; }
    .wave-bar { width: 4px; }
    .wave-play-btn { padding: 14px 32px; font-size: 16px; }

    .favorites-header { align-items: center; padding: 16px 12px; }
    .fav-cover-large { width: 80px; height: 80px; }
    .fav-cover-large .icon { width: 40px; height: 40px; }
    .fav-info h1 { font-size: 24px; }
    .fav-play-btn { width: 48px; height: 48px; right: 12px; bottom: 16px; }
}
@media (max-width: 400px) { #miniPlayerPrev { display: none; } }
@media (max-width: 360px) { .track-grid { grid-template-columns: 1fr; } }
@media (max-height: 500px) and (orientation: landscape) {
    .auth-card { padding: 20px; }
    .modal-content { max-height: 90vh; overflow-y: auto; }
}

/* ========================================== */
/* === ЭКВАЛАЙЗЕР (ФИНАЛЬНАЯ ВЕРСИЯ) === */
/* ========================================== */

.eq-presets {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 10px;
    scrollbar-width: none;
}
.eq-presets::-webkit-scrollbar { display: none; }

.eq-preset-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0a0c0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
}
.eq-preset-btn.active {
    background: rgba(192, 132, 252, 0.2);
    border-color: #c084fc;
    color: #c084fc;
}

/* Контейнер эквалайзера */
.eq-container {
    display: flex;
    justify-content: space-between;
    padding: 20px 10px 10px 10px; /* Добавили отступы внутри рамки */
    height: 190px;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    
    /* ОБВОДКА ОКНА */
    border: 1px solid rgba(192, 132, 252, 0.3) !important;
    border-radius: 16px !important;
    background: rgba(10, 5, 21, 0.5) !important;
}

/* Группа ползунка */
.eq-slider-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 30px;
    height: 100%;
    position: relative;
    z-index: 2;
}

.eq-slider-group label {
    font-size: 10px;
    color: #a0a0c0;
    font-weight: 600;
    margin-top: 0;
}

/* Сами инпуты (делаем их полностью прозрачными) */
.eq-slider-group input[type="range"] {
    -webkit-appearance: none;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 30px; /* Ширина зоны нажатия */
    height: 140px; /* Высота ползунка */
    background: transparent !important; /* УБИРАЕМ ВСЕ КОЛОНКИ */
    border: none !important;
    outline: none;
    margin: 0;
    padding: 0;
}

/* Кружочки */
.eq-slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #c084fc;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 0 15px rgba(192, 132, 252, 0.8);
    transition: transform 0.1s;
}

.eq-slider-group input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.2);
}

/* Слой для рисования линии */
#eq-svg-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

#equalizer-modal {
    z-index: 999999 !important;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 18px 0 14px;
    color: #7a7a9a;
    font-size: 13px;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(192, 132, 252, 0.18);
}
.auth-divider span { padding: 0 12px; }

.telegram-login-wrap {
    display: flex;
    justify-content: center;
    min-height: 48px;
    margin-bottom: 8px;
}

.telegram-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 13px 20px;
    background: #229ED9;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}
.telegram-login-btn:hover  { background: #1c8abf; }
.telegram-login-btn:active { transform: scale(0.98); }

/* ============================================================
   TELEGRAM AUTH — красивая кнопка с невидимым iframe
   ============================================================ */

/* -------- ВЫБЕРИ СТИЛЬ (одна из трёх строк): -------- */
:root {
    /* Стиль 1 — «Enigma Gradient» (фиолетово-голубой, в стиле приложения) */
    --tg-btn-bg:        linear-gradient(135deg, #a78bfa 0%, #8b5cf6 45%, #22d3ee 100%);

    /* Стиль 2 — «Classic Telegram» (официальный синий) */
    /* --tg-btn-bg:        linear-gradient(135deg, #2AABEE 0%, #229ED9 100%); */

    /* Стиль 3 — «Dark Glass» (стеклянная тёмная) */
    /* --tg-btn-bg:        linear-gradient(135deg, rgba(167,139,250,0.20) 0%, rgba(34,211,238,0.15) 100%); */

    --tg-btn-bg-hover:  linear-gradient(135deg, #b899fb 0%, #9d6ef7 45%, #3ad9ee 100%);
    --tg-btn-color:     #ffffff;
    --tg-btn-radius:    14px;
    --tg-btn-padding:   15px 22px;
    --tg-btn-font:      15px;
    --tg-btn-weight:    700;
    --tg-btn-gap:       10px;
    --tg-btn-shadow:    0 8px 24px rgba(139, 92, 246, 0.45);
    --tg-btn-shadow-h:  0 10px 32px rgba(139, 92, 246, 0.6);
    --tg-btn-icon-size: 22px;
}

/* ============================================================
   Разделитель "или"
   ============================================================ */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
    color: #7a7a9a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(192, 132, 252, 0.35),
        transparent);
}
.auth-divider span { padding: 0 4px; }

/* ============================================================
   Кнопка Telegram
   ============================================================ */
.telegram-auth-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--tg-btn-gap);
    width: 100%;
    min-height: 52px;
    padding: var(--tg-btn-padding);
    background: var(--tg-btn-bg);
    color: var(--tg-btn-color);
    border: none;
    border-radius: var(--tg-btn-radius);
    font-family: inherit;
    font-size: var(--tg-btn-font);
    font-weight: var(--tg-btn-weight);
    letter-spacing: 0.3px;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    box-shadow: var(--tg-btn-shadow);
    transition:
        transform .18s cubic-bezier(.4, 0, .2, 1),
        box-shadow .25s ease,
        background .25s ease;
    -webkit-tap-highlight-color: transparent;
}

/* Внутренний светлый слой для объёма */
.telegram-auth-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.20) 0%,
        transparent 45%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}

/* Shimmer-блик, пробегающий по кнопке */
.telegram-auth-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 50%;
    height: 100%;
    background: linear-gradient(110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.35) 50%,
        transparent 100%);
    transform: skewX(-20deg);
    transition: left .7s ease;
    pointer-events: none;
    z-index: 2;
}
.telegram-auth-btn:not(:disabled):hover::after { left: 120%; }

/* Ховер / тап */
@media (hover: hover) {
    .telegram-auth-btn:not(:disabled):hover {
        background: var(--tg-btn-bg-hover);
        box-shadow: var(--tg-btn-shadow-h);
        transform: translateY(-1px);
    }
}
.telegram-auth-btn:not(:disabled):active {
    transform: scale(0.975);
    box-shadow: var(--tg-btn-shadow);
}

/* Иконка */
.telegram-auth-btn .tg-icon {
    width: var(--tg-btn-icon-size);
    height: var(--tg-btn-icon-size);
    flex-shrink: 0;
    color: currentColor;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.15));
    transition: transform .25s ease;
    z-index: 3;
}
.telegram-auth-btn:not(:disabled):hover .tg-icon {
    transform: rotate(-12deg) scale(1.08);
}

/* Текст */
.telegram-auth-btn .tg-text {
    line-height: 1.1;
    white-space: nowrap;
    z-index: 3;
}

/* ============================================================
   Состояние загрузки
   ============================================================ */
.telegram-auth-btn.loading {
    cursor: progress;
    pointer-events: none;
}
.telegram-auth-btn.loading .tg-icon,
.telegram-auth-btn.loading .tg-text {
    opacity: 0.55;
}
.telegram-auth-btn .tg-loader {
    position: absolute;
    right: 18px;
    top: 50%;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border: 2px solid rgba(255, 255, 255, 0.30);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tgSpin 0.75s linear infinite;
    display: none;
    z-index: 3;
}
.telegram-auth-btn.loading .tg-loader { display: block; }

@keyframes tgSpin { to { transform: rotate(360deg); } }

/* ============================================================
   Пульсирующее свечение (только когда кнопка не в loading)
   ============================================================ */
.telegram-auth-btn:not(.loading) {
    animation: tgPulse 3s ease-in-out infinite;
}
@keyframes tgPulse {
    0%, 100% { box-shadow: var(--tg-btn-shadow); }
    50%      { box-shadow: var(--tg-btn-shadow-h); }
}

/* ============================================================
   Невидимый iframe Telegram поверх кнопки
   ============================================================ */
.telegram-widget-host {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0.001;      /* «невидимый», но кликабельный */
    pointer-events: auto;
    cursor: pointer;
    border-radius: inherit;
    z-index: 5;
}

.telegram-widget-host iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    transform: none !important;
    border-radius: inherit !important;
}

/* Скрыть кнопку, если бот не настроен */
.telegram-auth-btn.hidden { display: none !important; }

/* ============================================================
   Анимация появления
   ============================================================ */
.telegram-auth-btn {
    animation:
        tgPulse 3s ease-in-out infinite,
        tgFadeIn 0.5s ease-out backwards;
}
@keyframes tgFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   СВЕТЛАЯ ТЕМА — корректировки
   ============================================================ */
body.light-theme .auth-divider {
    color: #7a6a98;
}
body.light-theme .auth-divider::before,
body.light-theme .auth-divider::after {
    background: linear-gradient(90deg,
        transparent,
        rgba(139, 92, 246, 0.35),
        transparent);
}

body.light-theme .telegram-auth-btn {
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.30);
    color: #fff;
}
body.light-theme .telegram-auth-btn:not(:disabled):hover {
    box-shadow: 0 10px 32px rgba(124, 58, 237, 0.45);
}

/* ============================================================
   Адаптив: чуть компактнее на маленьких экранах
   ============================================================ */
@media (max-width: 400px) {
    :root {
        --tg-btn-padding: 13px 18px;
        --tg-btn-font: 14px;
        --tg-btn-icon-size: 20px;
    }
    .telegram-auth-btn { min-height: 48px; }
}
/* ============================================================
   TELEGRAM AUTH — обёртка с растянутым прозрачным iframe
   ============================================================ */
.telegram-auth-wrap {
    position: relative !important;
    width: 100% !important;
    height: 52px !important;
    margin-top: 4px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
}

.telegram-auth-btn {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 45%, #22d3ee 100%) !important;
    color: #fff !important;
    border-radius: 14px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.45) !important;
    pointer-events: none !important;
    user-select: none !important;
}

.telegram-auth-btn .tg-icon {
    width: 22px !important;
    height: 22px !important;
    flex-shrink: 0 !important;
    z-index: 2 !important;
}

.telegram-auth-btn .tg-text {
    white-space: nowrap !important;
    z-index: 2 !important;
}

.telegram-auth-btn .tg-loader {
    display: none !important;
}

.telegram-widget-host {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 10 !important;
    opacity: 0.001 !important;
    pointer-events: auto !important;
    overflow: hidden !important;
    border-radius: 14px !important;
}

.telegram-widget-host iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    transform: none !important;
}

.telegram-auth-wrap.hidden {
    display: none !important;
}

.telegram-auth-wrap.loading .telegram-auth-btn {
    opacity: 0.65 !important;
}

/* Профиль в мобильной шторке */
#user-dropdown-menu #menu-user-email {
    text-align: left !important;
    padding: 0 !important;
    margin-bottom: 12px !important;
    border-bottom: 1px solid rgba(138, 43, 226, 0.2) !important;
    color: inherit !important;
    font-size: inherit !important;
}

.user-menu-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px 16px;
}

.user-menu-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(192, 132, 252, 0.45);
    flex-shrink: 0;
}

.user-menu-avatar.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: #fff;
    font-weight: 800;
    font-size: 20px;
}

.user-menu-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.user-menu-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-username {
    font-size: 13px;
    color: var(--text-dark-mut);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-theme .user-menu-name     { color: #2a1a48; }
body.light-theme .user-menu-username { color: #7a6a98; }
body.light-theme .user-menu-avatar   { border-color: rgba(139, 92, 246, 0.35); }

.telegram-auth-wrap.native-mode .telegram-auth-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
}
.telegram-auth-wrap.native-mode .telegram-widget-host {
    display: none !important;
}

.telegram-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: #2AABEE;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.telegram-btn:hover { background: #229ED9; }

/* ============================================================
   СУПЕР-СТИЛЬ ДЛЯ КНОПКИ TELEGRAM (ENIGMA STYLE)
   ============================================================ */
.telegram-auth-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 14px 24px;
    /* Фиолетово-голубой градиент приложения */
    background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 45%, #22d3ee 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

/* Эффект блика (Shimmer) */
.telegram-auth-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-25deg);
    animation: tgShimmer 3s infinite;
}

@keyframes tgShimmer {
    0% { left: -100%; }
    20% { left: 200%; }
    100% { left: 200%; }
}

/* Иконка */
.telegram-auth-btn .tg-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

/* Текст */
.telegram-auth-btn .tg-text {
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Эффекты при нажатии и наведении */
@media (hover: hover) {
    .telegram-auth-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(139, 92, 246, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.3);
    }
    .telegram-auth-btn:hover .tg-icon {
        transform: scale(1.1) rotate(-10deg);
    }
}

.telegram-auth-btn:active {
    transform: scale(0.96);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Пульсация свечения, когда кнопка не нажата */
.telegram-auth-btn {
    animation: tgPulse 3s ease-in-out infinite;
}
@keyframes tgPulse {
    0%, 100% { box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 8px 32px rgba(34, 211, 238, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.2); }
}