/* ========================================
🎵 GHOST PLAYER STYLES v3.0 — NEON FUTURE
======================================== */

/* === КОНТЕЙНЕР ПЛЕЕРА === */
.player-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(180deg, rgba(30, 30, 50, 0.95), rgba(15, 15, 26, 0.98));
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 2px solid transparent;
    border-radius: 24px 24px 0 0;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: var(--player-height);
    /* Неоновая обводка — КРАСНАЯ по умолчанию */
    box-shadow: 
        0 0 20px rgba(239, 68, 68, 0.5),
        0 0 40px rgba(239, 68, 68, 0.3),
        inset 0 0 30px rgba(239, 68, 68, 0.1);
    border-image: linear-gradient(90deg, #ef4444, #dc2626) 1;
    /* Ghost Mode по умолчанию */
    opacity: 0.15;
    transform: translateY(0);
}

/* При наведении — СИНИЙ неон */
.player-container:hover,
.player-container:active {
    opacity: 1 !important;
    box-shadow: 
        0 0 30px rgba(6, 182, 212, 0.6),
        0 0 60px rgba(6, 182, 212, 0.4),
        0 10px 50px rgba(6, 182, 212, 0.3),
        inset 0 0 40px rgba(6, 182, 212, 0.15) !important;
    transform: translateY(-5px) scale(1.01) !important;
    border-image: linear-gradient(90deg, #06b6d4, #0891b2) 1;
}

/* Развёрнутый плеер — ПОДНЯТЫЙ вверх */
.player-container.player-expanded {
    height: 520px !important;
    opacity: 1 !important;
    border-radius: 24px 24px 0 0;
    box-shadow: 
        0 -10px 60px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(139, 92, 246, 0.4),
        0 0 120px rgba(6, 182, 212, 0.2) !important;
    transform: translateY(-20px) !important;
    border-image: linear-gradient(90deg, #8b5cf6, #06b6d4) 1;
}

/* === БАР ПЛЕЕРА === */
.player-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: var(--player-height);
    cursor: grab;
    user-select: none;
    position: relative;
    z-index: 2;
}

.player-bar:active {
    cursor: grabbing;
}

/* === ИНФОРМАЦИЯ О ТРЕКЕ === */
.player-info-mini {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 35%;
    min-width: 200px;
    max-width: 300px;
}

.player-cover-mini {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--bg-card);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(239, 68, 68, 0.5);
}

.player-cover-mini:hover {
    transform: scale(1.08) rotate(2deg);
    box-shadow: 0 10px 35px rgba(6, 182, 212, 0.5);
    border-color: rgba(6, 182, 212, 0.8);
}

.player-text-mini div:first-child {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.player-text-mini div:last-child {
    font-size: 13px;
    color: var(--text-muted);
}

/* === КОНТРОЛЫ === */
.player-controls-mini {
    display: flex;
    align-items: center;
    gap: 20px;
}

.p-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    padding: 12px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.p-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.4), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.p-btn:hover {
    color: #fff;
    transform: scale(1.15);
    border-color: rgba(6, 182, 212, 0.6);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.5);
}

.p-btn:hover::before {
    opacity: 1;
}

.p-btn:active {
    transform: scale(0.95);
}

/* Кнопка Play/Pause — акцентная */
.play-pause {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 5px 25px rgba(239, 68, 68, 0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(239, 68, 68, 0.6);
}

.play-pause:hover {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    box-shadow: 0 8px 35px rgba(6, 182, 212, 0.7);
    border-color: rgba(6, 182, 212, 0.8);
    transform: scale(1.15);
}

.play-pause:active {
    transform: scale(0.95);
}

/* === ГРОМКОСТЬ === */
.volume-control-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 20%;
    justify-content: flex-end;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.volume-control-mini:hover {
    opacity: 1;
}

.volume-control-mini input[type="range"] {
    width: 100px;
    accent-color: #ef4444;
    cursor: pointer;
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.volume-control-mini input[type="range"]:hover {
    accent-color: #06b6d4;
}

/* === ПОЛНЫЙ ПЛЕЕР === */
.player-full {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    height: 440px;
    position: relative;
    z-index: 1;
    background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1), transparent 70%);
}

.player-full-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ✅ ПК: В РЯД (обложка + визуализатор + инфо) */
.player-full-body {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 800px;
    gap: 30px;
}

/* Обложка в полном плеере */
.player-cover-full {
    width: 200px;
    height: 200px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(139, 92, 246, 0.3);
    background: var(--bg-card);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(139, 92, 246, 0.5);
    flex-shrink: 0;
}

.player-cover-full:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 
        0 30px 100px rgba(0, 0, 0, 0.7),
        0 0 80px rgba(6, 182, 212, 0.5);
    border-color: rgba(6, 182, 212, 0.8);
}

/* === ЭНЕРГЕТИЧЕСКИЙ ВИЗУАЛИЗАТОР В ПЛЕЕРЕ === */
.player-visualizer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 200px;
    background: linear-gradient(180deg, rgba(15, 15, 26, 0.9), rgba(30, 30, 50, 0.95));
    border-radius: 20px;
    border: 2px solid rgba(139, 92, 246, 0.4);
    padding: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 0 40px rgba(139, 92, 246, 0.2),
        0 0 30px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.player-visualizer-container:hover {
    border-color: rgba(139, 92, 246, 0.7);
    box-shadow: 
        inset 0 0 50px rgba(139, 92, 246, 0.3),
        0 0 40px rgba(139, 92, 246, 0.5);
}

.player-visualizer-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(239, 68, 68, 0.05), 
        rgba(139, 92, 246, 0.05), 
        rgba(6, 182, 212, 0.05));
    opacity: 0.5;
    animation: visualizer-pulse 2s ease-in-out infinite;
}

@keyframes visualizer-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.energy-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    height: 150px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.energy-bar {
    width: 12px;
    background: linear-gradient(180deg, #06b6d4, #8b5cf6, #ef4444);
    border-radius: 6px;
    transition: height 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.6);
    min-height: 5px;
}

.energy-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 10px;
    position: relative;
    z-index: 2;
    font-weight: 600;
}

/* Информация в полном плеере */
.player-full-info {
    text-align: center;
    flex: 1;
    min-width: 200px;
}

.player-full-info h2 {
    font-size: 20px;
    margin-bottom: 8px;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.player-full-info p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Прогресс бар */
.progress-container {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    color: var(--text-muted);
    font-size: 13px;
}

.progress-container input[type="range"] {
    flex: 1;
    accent-color: #8b5cf6;
    cursor: pointer;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    -webkit-appearance: none;
}

.progress-container input[type="range"]::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
    -webkit-appearance: none;
}

.progress-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.8);
}

/* Контролы полного плеера */
.player-full-controls {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-bottom: 25px;
}

.player-full-controls .p-btn {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-pause-large {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: white;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 10px 50px rgba(139, 92, 246, 0.6),
        0 0 80px rgba(139, 92, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 3px solid rgba(139, 92, 246, 0.6);
}

.play-pause-large:hover {
    transform: scale(1.12);
    box-shadow: 
        0 15px 60px rgba(139, 92, 246, 0.8),
        0 0 100px rgba(6, 182, 212, 0.5);
    border-color: rgba(6, 182, 212, 0.8);
}

.play-pause-large:active {
    transform: scale(0.98);
}

/* Активные кнопки repeat/shuffle */
.p-btn.active {
    color: #06b6d4 !important;
    border-color: rgba(6, 182, 212, 0.6) !important;
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.5) !important;
}

.p-btn.active i {
    color: #06b6d4 !important;
    text-shadow: 0 0 15px rgba(6, 182, 212, 0.8);
}

/* Громкость в полном режиме */
.volume-container {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 14px;
}

.volume-container input[type="range"] {
    width: 120px;
    accent-color: #8b5cf6;
}

/* ========================================
📱 АДАПТИВ — ИСПРАВЛЕНО (ОДИН БЛОК!)
======================================== */

/* Планшет: визуализатор становится горизонтальным */
@media (max-width: 992px) {
    .player-full-body {
        flex-direction: column;
        gap: 25px;
    }
    
    .player-visualizer-container {
        width: 100%;
        max-width: 400px;
        height: 100px;
        flex-direction: row;
    }
    
    .energy-bars {
        height: 70px;
        width: 100%;
        gap: 4px;
    }
    
    .energy-bar {
        width: 10px;
    }
    
    .energy-label {
        display: none;
    }
    
    .player-cover-full {
        width: 180px;
        height: 180px;
    }
}

/* Мобильный */
@media (max-width: 768px) {
    .player-container {
        border-radius: 20px 20px 0 0;
    }
    
    .player-bar {
        padding: 0 20px;
    }
    
    .player-info-mini {
        width: 55%;
    }
    
    .player-text-mini div:first-child {
        max-width: 120px;
        font-size: 14px;
    }
    
    .player-controls-mini .p-btn:not(.play-pause):not(:last-child) {
        display: none;
    }
    
    .volume-control-mini {
        display: none;
    }
    
    .player-full {
        height: 460px;
        padding: 25px;
    }
    
    .player-cover-full {
        width: 160px;
        height: 160px;
    }
    
    .player-full-controls {
        gap: 20px;
    }
    
    .play-pause-large {
        width: 65px;
        height: 65px;
        font-size: 26px;
    }
    
    .player-visualizer-container {
        height: 80px;
    }
    
    .energy-bars {
        height: 50px;
    }
}

/* Маленький мобильный */
@media (max-width: 480px) {
    .player-container.player-expanded {
        height: 420px;
    }
    
    .player-cover-full {
        width: 140px;
        height: 140px;
    }
    
    .player-full-info h2 {
        font-size: 18px;
    }
}

/* ========================================
🎬 АНИМАЦИИ
======================================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes neon-flicker {
    0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.5); }
    50% { box-shadow: 0 0 30px rgba(239, 68, 68, 0.8); }
}

/* Утилиты */
.player-container.dragging {
    cursor: grabbing !important;
    opacity: 0.9 !important;
    transition: none !important;
}

/* ========================================
📱 PWA INSTALL BUTTON + COOKIE NOTICE
======================================== */

/* === PWA INSTALL BUTTON === */
.pwa-install-banner {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.95), rgba(6, 182, 212, 0.95));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.5);
    z-index: 9998;
    display: none;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.pwa-install-banner.show {
    display: block;
}

.pwa-install-banner .banner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pwa-install-banner .banner-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pwa-install-banner .banner-title i {
    color: #fff;
}

.pwa-install-banner .banner-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 14px;
}

.pwa-install-banner .banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.pwa-install-banner .banner-content {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.pwa-install-banner .banner-actions {
    display: flex;
    gap: 10px;
}

.pwa-install-banner .btn-install {
    flex: 1;
    padding: 10px 16px;
    background: #fff;
    color: #8b5cf6;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.pwa-install-banner .btn-install:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.pwa-install-banner .btn-later {
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.pwa-install-banner .btn-later:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* === COOKIE NOTICE === */
.cookie-notice {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px 25px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 9997;
    display: none;
    max-width: 500px;
    width: calc(100% - 40px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cookie-notice.show {
    display: block;
    transform: translateX(-50%) translateY(0);
}

.cookie-notice .cookie-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-notice .cookie-text {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
}

.cookie-notice .cookie-text a {
    color: var(--accent-primary);
    text-decoration: underline;
}

.cookie-notice .cookie-text a:hover {
    color: var(--accent-secondary);
}

.cookie-notice .cookie-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-notice .btn-cookie {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cookie-notice .btn-accept {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
}

.cookie-notice .btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.cookie-notice .btn-decline {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-notice .btn-decline:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-main);
}

/* Анимация появления */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .pwa-install-banner {
        bottom: 100px;
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .cookie-notice {
        bottom: 100px;
        left: 20px;
        right: 20px;
        width: auto;
        transform: translateY(100px);
    }
    
    .cookie-notice.show {
        transform: translateY(0);
    }
    
    .cookie-notice .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-notice .btn-cookie {
        width: 100%;
        justify-content: center;
    }
}