/* ===== iOS-STYLE MODERN PLAYER ===== */
/* Mobile-first дизайн с glass morphism эффектами */

/* ===== ГЛАВНАЯ КАРТОЧКА ПЛЕЕРА ===== */
.modern-player-card {
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur-strong);
    -webkit-backdrop-filter: var(--glass-blur-strong);
    border-radius: var(--radius-xxl);
    padding: var(--space-2xl);
    max-width: 440px;
    margin: var(--space-xl) auto;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.modern-player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(
        circle at 50% 0%,
        rgba(229, 57, 53, 0.1),
        transparent 70%
    );
    pointer-events: none;
}

.modern-player-card:hover {
    box-shadow: var(--glass-shadow-hover);
    transform: translateY(-4px);
}

/* ===== HEADER ПЛЕЕРА ===== */
.meditation-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
    position: relative;
    z-index: 1;
}

.meditation-logo {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.logo-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    box-shadow: 
        var(--shadow-lg),
        0 0 0 4px rgba(255, 255, 255, 0.8),
        var(--primary-glow);
    transition: all var(--transition-base);
}

.logo-image:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 
        var(--shadow-xl),
        0 0 0 4px rgba(255, 255, 255, 1),
        var(--primary-glow);
}

.meditation-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.8px;
}

.meditation-subtitle {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    font-weight: var(--font-weight-medium);
}

/* ===== ВИЗУАЛИЗАЦИЯ С GLASS ЭФФЕКТОМ ===== */
.player-visualization-modern {
    width: 100%;
    margin: var(--space-2xl) 0;
}

.player-control-row {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-2xl);
    background: var(--glass-bg-light);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.7);
    min-height: 120px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.player-control-row::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.8s ease;
}

.player-control-row:hover::before {
    left: 150%;
}

.player-control-row:hover {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.03);
    transform: translateY(-2px);
}

/* ===== ГЛАВНАЯ КНОПКА PLAY ===== */
.player-main-btn {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        var(--primary-shadow),
        0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-base) var(--spring);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.player-main-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.3));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.player-main-btn:hover::before {
    opacity: 1;
}

.player-main-btn:hover {
    transform: scale(1.08);
    box-shadow: 
        var(--primary-shadow-hover),
        var(--primary-glow),
        0 4px 8px rgba(0, 0, 0, 0.15);
}

.player-main-btn:active {
    transform: scale(1.02);
}

.player-main-btn i {
    color: white;
    font-size: 1.5rem;
    margin-left: 3px;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* ===== ВИЗУАЛИЗАЦИЯ ЗВУКОВЫХ ВОЛН ===== */
.visualization-container {
    flex: 1;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(
        90deg,
        rgba(229, 57, 53, 0.03) 0%,
        rgba(255, 82, 82, 0.05) 50%,
        rgba(229, 57, 53, 0.03) 100%
    );
    border-radius: var(--radius-lg);
    padding: 0 var(--space-2xl);
    transition: all var(--transition-slow);
    cursor: pointer;
    border: 1px solid rgba(229, 57, 53, 0.08);
}

.visualization-container:hover {
    background: linear-gradient(
        90deg,
        rgba(229, 57, 53, 0.06) 0%,
        rgba(255, 82, 82, 0.08) 50%,
        rgba(229, 57, 53, 0.06) 100%
    );
    border-color: rgba(229, 57, 53, 0.15);
    box-shadow: 
        0 0 20px rgba(229, 57, 53, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Звуковые волны */
.sound-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 100%;
    width: 100%;
}

.wave-bar {
    display: inline-block;
    width: 4px;
    background: linear-gradient(
        180deg,
        var(--primary-color) 0%,
        var(--secondary-color) 100%
    );
    border-radius: var(--radius-xs);
    transition: all var(--transition-slow);
    opacity: 0.4;
    box-shadow: 0 0 6px rgba(229, 57, 53, 0.2);
}

/* Different heights for realistic look */
.wave-bar:nth-child(1) { height: 25%; }
.wave-bar:nth-child(2) { height: 45%; }
.wave-bar:nth-child(3) { height: 60%; }
.wave-bar:nth-child(4) { height: 35%; }
.wave-bar:nth-child(5) { height: 70%; }
.wave-bar:nth-child(6) { height: 50%; }
.wave-bar:nth-child(7) { height: 80%; }
.wave-bar:nth-child(8) { height: 65%; }
.wave-bar:nth-child(9) { height: 55%; }
.wave-bar:nth-child(10) { height: 75%; }
.wave-bar:nth-child(11) { height: 40%; }
.wave-bar:nth-child(12) { height: 50%; }
.wave-bar:nth-child(13) { height: 55%; }
.wave-bar:nth-child(14) { height: 30%; }
.wave-bar:nth-child(15) { height: 20%; }

@keyframes wave-playing {
    0% { transform: scaleY(0.6); opacity: 0.6; }
    15% { transform: scaleY(1.2); opacity: 0.95; }
    30% { transform: scaleY(0.8); opacity: 0.85; }
    50% { transform: scaleY(1.4); opacity: 1; }
    70% { transform: scaleY(0.7); opacity: 0.8; }
    85% { transform: scaleY(1.1); opacity: 0.9; }
    100% { transform: scaleY(0.6); opacity: 0.6; }
}

.sound-wave.playing .wave-bar {
    animation: wave-playing 1.5s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
    opacity: 1;
    box-shadow: 
        0 0 12px rgba(229, 57, 53, 0.4),
        0 0 6px rgba(255, 82, 82, 0.3);
}

/* Animation delays for playing state */
.sound-wave.playing .wave-bar:nth-child(1) { animation-delay: 0s; }
.sound-wave.playing .wave-bar:nth-child(2) { animation-delay: 0.1s; }
.sound-wave.playing .wave-bar:nth-child(3) { animation-delay: 0.2s; }
.sound-wave.playing .wave-bar:nth-child(4) { animation-delay: 0.3s; }
.sound-wave.playing .wave-bar:nth-child(5) { animation-delay: 0.4s; }
.sound-wave.playing .wave-bar:nth-child(6) { animation-delay: 0.5s; }
.sound-wave.playing .wave-bar:nth-child(7) { animation-delay: 0.6s; }
.sound-wave.playing .wave-bar:nth-child(8) { animation-delay: 0.7s; }
.sound-wave.playing .wave-bar:nth-child(9) { animation-delay: 0.6s; }
.sound-wave.playing .wave-bar:nth-child(10) { animation-delay: 0.5s; }
.sound-wave.playing .wave-bar:nth-child(11) { animation-delay: 0.4s; }
.sound-wave.playing .wave-bar:nth-child(12) { animation-delay: 0.3s; }
.sound-wave.playing .wave-bar:nth-child(13) { animation-delay: 0.2s; }
.sound-wave.playing .wave-bar:nth-child(14) { animation-delay: 0.1s; }
.sound-wave.playing .wave-bar:nth-child(15) { animation-delay: 0s; }

.low-perf-mode .visualization-container {
    background: rgba(229, 57, 53, 0.05);
    border-color: rgba(229, 57, 53, 0.08);
    box-shadow: none;
    cursor: default;
}

.low-perf-mode .sound-wave.playing .wave-bar {
    animation: none;
    opacity: 0.6;
    box-shadow: none;
}

.low-perf-mode .meditation-visual-btn {
    opacity: 0.5;
    pointer-events: none;
}

/* ===== КНОПКА МЕДИТАЦИОННОЙ ВИЗУАЛИЗАЦИИ ===== */
.meditation-visual-btn {
    width: 56px;
    height: 56px;
    min-width: 56px;
    border-radius: var(--radius-full);
    background: rgba(142, 68, 173, 0.12);
    backdrop-filter: blur(10px);
    border: 1.5px solid rgba(142, 68, 173, 0.25);
    color: rgba(142, 68, 173, 1);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base) var(--spring);
    box-shadow: 
        0 2px 8px rgba(142, 68, 173, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    position: relative;
}

.meditation-visual-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, rgba(142, 68, 173, 0.8), rgba(155, 89, 182, 0.8));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.meditation-visual-btn:hover::before {
    opacity: 1;
}

.meditation-visual-btn:hover {
    transform: scale(1.08) rotate(-5deg);
    box-shadow: 
        0 6px 20px rgba(142, 68, 173, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    color: white;
}

.meditation-visual-btn:active {
    transform: scale(1.02);
}

.meditation-visual-btn i {
    transition: transform var(--transition-base);
    position: relative;
    z-index: 1;
}

.meditation-visual-btn:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* ===== TIMELINE / ПРОГРЕСС БАР ===== */
.player-timeline {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
}

.time-current,
.time-total {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    min-width: 48px;
    font-variant-numeric: tabular-nums;
}

.time-total {
    font-weight: var(--font-weight-bold);
    color: var(--primary-color);
}

.timeline-progress {
    flex: 1;
}

.progress-bar-container {
    height: 6px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: all var(--transition-base);
}

.progress-bar-container:hover {
    height: 8px;
}

.progress-bar-track {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--radius-full);
    transition: width 0.15s ease-out;
    box-shadow: 0 0 8px rgba(229, 57, 53, 0.25);
    pointer-events: none;
}

.progress-bar-track::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid var(--primary-color);
    border-radius: var(--radius-full);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.25),
        0 0 0 0 rgba(229, 57, 53, 0.3);
    opacity: 1;
    transition: all var(--transition-base);
}

.progress-bar-container:hover .progress-bar-track::after {
    transform: translateY(-50%) scale(1.2);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 0 0 4px rgba(229, 57, 53, 0.15);
}

/* ===== КОНТЕЙНЕР ТРЕКОВ ===== */
.tracks-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

/* ===== КАРТОЧКИ ТРЕКОВ (ГОЛОС / МЕЛОДИЯ) ===== */
.track-box {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.track-box:hover {
    background: var(--glass-bg-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.7);
}

.track-box-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
}

.track-box-header:hover {
    background: rgba(229, 57, 53, 0.05);
}

.track-box.collapsed .track-box-header {
    margin-bottom: 0;
}

.track-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    box-shadow: var(--primary-shadow);
    transition: all var(--transition-base);
}

.track-box-header:hover .track-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--primary-shadow-hover);
}

.track-title {
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    flex: 1;
}

.track-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    color: var(--text-secondary);
}

.track-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.track-box-content {
    overflow: hidden;
    transition: max-height var(--transition-slow), opacity var(--transition-base);
    max-height: 300px;
    opacity: 1;
}

.track-box.collapsed .track-box-content {
    max-height: 0;
    opacity: 0;
    visibility: hidden;
}

/* ===== ТЕКУЩИЙ ТРЕК ===== */
.current-track {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    margin: var(--space-lg) 0 var(--space-md);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xs);
}

.current-track:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.track-name {
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.current-track:hover .track-name {
    color: var(--primary-color);
}

.track-actions {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.track-favorite,
.track-select {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.track-favorite:hover,
.track-select:hover {
    background: rgba(229, 57, 53, 0.1);
    color: var(--primary-color);
    transform: scale(1.1);
}

.track-favorite i.fas {
    color: var(--primary-color);
}

/* ===== VOLUME SLIDER ===== */
.volume-slider-container {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

.volume-slider-container i {
    color: var(--text-secondary);
    opacity: 0.7;
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
}

.volume-slider-container:hover i {
    opacity: 1;
    color: var(--primary-color);
}

.modern-slider {
    -webkit-appearance: none;
    height: 6px;
    flex: 1;
    background: rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-full);
    outline: none;
    position: relative;
}

.modern-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: white;
    cursor: pointer;
    border: 3px solid var(--primary-color);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    transition: all var(--transition-base);
}

.modern-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(229, 57, 53, 0.4);
}

.modern-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

/* ===== MEDITATION TIPS ===== */
.meditation-tips {
    margin-top: var(--space-lg);
}

.tip {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(229, 57, 53, 0.08);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    transition: all var(--transition-base);
}

.tip:hover {
    background: rgba(229, 57, 53, 0.12);
    transform: translateX(4px);
}

.tip i {
    color: var(--primary-color);
    font-size: var(--font-size-lg);
}

.tip span {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== ПАНЕЛЬ УПРАВЛЕНИЯ ===== */
.player-controls-panel {
    margin-top: var(--space-2xl);
    padding: var(--space-xl);
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.control-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.control-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    color: var(--text-primary);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-xs);
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
}

.control-btn i {
    font-size: var(--font-size-lg);
}

.favorites-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    box-shadow: var(--primary-shadow);
}

.favorites-btn:hover {
    box-shadow: var(--primary-shadow-hover);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .modern-player-card {
        padding: var(--space-xl);
        border-radius: var(--radius-xl);
    }
    
    .player-control-row {
        gap: var(--space-md);
        padding: var(--space-xl);
        min-height: 100px;
    }
    
    .player-main-btn {
        width: 64px;
        height: 64px;
        min-width: 64px;
    }
    
    .meditation-visual-btn {
        width: 48px;
        height: 48px;
        min-width: 48px;
        font-size: 1rem;
    }
    
    .visualization-container {
        height: 80px;
        padding: 0 var(--space-lg);
    }
}

@media (max-width: 480px) {
    .modern-player-card {
        padding: var(--space-lg);
    }
    
    .player-control-row {
        gap: var(--space-sm);
        padding: var(--space-lg);
        min-height: 90px;
    }
    
    .player-main-btn {
        width: 56px;
        height: 56px;
        min-width: 56px;
    }
    
    .player-main-btn i {
        font-size: 1.3rem;
    }
    
    .meditation-visual-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
        font-size: 0.9rem;
    }
    
    .visualization-container {
        height: 70px;
        padding: 0 var(--space-md);
    }
    
    .sound-wave {
        gap: 4px;
    }
    
    .wave-bar {
        width: 3px;
    }
    
    .control-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .control-btn {
        justify-content: center;
        width: 100%;
    }
}
