/**
 * Modern Audio Player - Main Stylesheet
 * 
 * Production-ready CSS with optimized structure and performance.
 * Organized sections: Variables → Base → Components → Animations → Responsive
 * 
 * @package ModernAudioPlayer
 * @version 1.0.0
 */

/**
 * CSS Variables - Timing, Colors, Layout
 */
.modern-audio-player-wrapper {
    /* Layout & Sizing */
    --play-btn-min: 50px;
    --play-btn-max: 65px;
    --small-btn-min: 40px;
    --small-btn-max: 45px;
    --track-separator-color: #eeeeee;

    /* Animation Timings - Synced with JS (MAP_TIMING) */
    --cover-open-duration: 0.9s;
    --cover-close-duration: 0.9s;
    --cover-transition-delay: 0.2s;
    --track-fade-duration: 0.28s;
    --track-slide-duration: 0.6s;
    --track-appear-duration: 0.35s;
    --batch-fade-duration: 0.4s;
    --carousel-height-transition: 0.9s;
    --carousel-slide-duration: 0.9s;
    --carousel-rotate-duration: 1s;
    --carousel-fade-duration: 1s;
    --carousel-flip-duration: 1.2s;
    --carousel-vinyl-duration: 1.5s;
    --carousel-door-duration: 1.2s;
    --carousel-zoom-duration: 1s;
    --carousel-glitch-duration: 0.8s;
    --carousel-wave-duration: 1.4s;
    --carousel-parallax-duration: 1.2s;
    --carousel-stack-duration: 1s;
    --carousel-vortex-duration: 1s;
    --button-hover-duration: 0.4s;
    --popup-transition: 0.3s;
    --settings-transition: 0.3s;
    --volume-slider-transition: 0.1s;

    /* Easing Functions */
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out: ease-in-out;
    --ease-out: ease-out;
    --ease-in: ease-in;

    overflow-anchor: none !important;
}

.modern-audio-player-wrapper::after {
    content: '';
    display: block;
    height: 50vh;
}

/**
 * Opacity & Visibility Control
 */
.modern-audio-player-wrapper:not(.elementor-editor-preview) {
    opacity: 0;
    transition: opacity var(--popup-transition) var(--ease-in);
}

.modern-audio-player-wrapper:not(.elementor-editor-preview).player-ready {
    opacity: 1;
}

.elementor-editor-preview,
.elementor-widget-modern-audio-player .modern-audio-player-wrapper {
    opacity: 1 !important;
}

/**
 * Main Player Wrapper
 */
.modern-audio-player-wrapper {
    position: relative;
    text-align: center;
    background: white;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    isolation: isolate;
    transition: all 0.3s ease;
    background-origin: border-box;
    background-clip: border-box;
    display: flex;
    flex-direction: column;
}

.modern-audio-player-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    pointer-events: none;
    z-index: -2;
    border-radius: inherit;
}

.modern-audio-player-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/**
 * Player Header
 */
.modern-audio-player-wrapper .player-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.modern-audio-player-wrapper .player-title {
    flex: 1;
    text-align: center;
}

.modern-audio-player-wrapper .player-title h3 {
    margin: 0;
    padding: 0 20px;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

/**
 * Settings Button
 */
.modern-audio-player-wrapper .settings-button {
    position: absolute;
    top: 0;
    right: 0;
    width: 45px;
    height: 45px;
    background: transparent !important;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modern-audio-player-wrapper .settings-button:hover,
.modern-audio-player-wrapper .settings-button:focus,
.modern-audio-player-wrapper .settings-button:active {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

.modern-audio-player-wrapper .settings-button .dots-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.modern-audio-player-wrapper .settings-button:hover .dots-container {
    opacity: 1;
}

.modern-audio-player-wrapper .settings-button .dot {
    width: 20px !important;
    height: 3px !important;
    background: currentColor;
    border-radius: 2px;
    display: block;
}

/**
 * Album Cover Thumbnail
 */
.modern-audio-player-wrapper .album-cover-thumb {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
}

.modern-audio-player-wrapper .album-cover-thumb:hover {
    transform: scale(1.08);
}

.modern-audio-player-wrapper .album-cover-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modern-audio-player-wrapper:not(.elementor-editor-preview)
    .album-cover-thumb:has(img[src*='placeholder.png']) {
    display: none !important;
}

.modern-audio-player-wrapper:not(.elementor-editor-preview)
    .album-cover-popup:has(img[src*='placeholder.png']) {
    display: none !important;
}

/**
 * Album Cover Popup
 */
.modern-audio-player-wrapper {
    position: relative !important;
    overflow: visible !important;
}

.modern-audio-player-wrapper .album-cover-popup {
    position: absolute !important;
    top: 5px !important;
    left: 5px !important;
    width: 320px !important;
    height: auto !important;
    min-height: 320px !important;
    background: rgba(0, 0, 0, 0.96) !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: scale(0.15) translateZ(0) !important;
    transform-origin: top left !important;
    z-index: 1000 !important;
    padding: 16px !important;
    box-sizing: border-box !important;
    transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1),
        opacity 0.7s cubic-bezier(0.25, 0.8, 0.25, 1),
        visibility 0s linear 0.7s !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    will-change: transform, opacity !important;
    backface-visibility: hidden !important;
}

.modern-audio-player-wrapper .album-cover-popup.scaling {
    transform: scale(1) translateZ(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
    transition: transform 0.7s cubic-bezier(0.25, 0.8, 0.25, 1),
        opacity 0.7s cubic-bezier(0.25, 0.8, 0.25, 1),
        visibility 0s linear 0s !important;
}

.modern-audio-player-wrapper .album-cover-popup img {
    width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    transform: translateZ(0) !important;
}

.modern-audio-player-wrapper .close-cover {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px) !important;
    color: #fff !important;
    font-size: 18px !important;
    font-weight: 300 !important;
    line-height: 1 !important;
    border: none !important;
    cursor: pointer !important;
    border-radius: 50% !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    transition: opacity 0.25s ease !important;
    opacity: 0 !important;
    transform: translateZ(0) !important;
    z-index: 20;
}

.modern-audio-player-wrapper .album-cover-popup.scaling .close-cover {
    opacity: 1 !important;
    transition-delay: 0.5s !important;
}

.modern-audio-player-wrapper .close-cover:hover {
    background: rgba(255, 255, 255, 0.35) !important;
}

body.album-popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/**
 * Current Track Display
 */
.modern-audio-player-wrapper .current-track-display {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 18px;
    border-radius: 12px;
    margin: 0 0 16px 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/**
 * Controls Container
 */
.modern-audio-player-wrapper .controls-container {
    width: calc(100% - 40px);
    min-width: 200px;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 8px;
    overflow: visible;
    box-sizing: border-box;
}

.modern-audio-player-wrapper .controls-inner {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 0;
    position: relative;
    overflow: visible;
    isolation: isolate;
    container-type: inline-size;
    container-name: controls-area;
    z-index: 100;
}

.modern-audio-player-wrapper .controls-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, calc(24cqw * 0.138), 18px);
    width: 100%;
    position: relative;
    z-index: 100;
    padding: 8px 0;
    flex-wrap: nowrap;
    overflow: visible;
}

/**
 * Control Buttons - Base
 */
.modern-audio-player-wrapper .control-button {
    flex: 0 0 auto;
    padding: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    transition: transform var(--button-hover-duration) var(--ease-smooth),
        filter var(--button-hover-duration) var(--ease-smooth),
        background var(--button-hover-duration) var(--ease-smooth),
        color var(--button-hover-duration) var(--ease-smooth);
    transform-origin: center center;
    overflow: visible;
    position: relative;
    z-index: 2;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.modern-audio-player-wrapper .control-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.modern-audio-player-wrapper .control-button:active {
    transform: scale(0.95);
}

/**
 * Small Buttons
 */
.modern-audio-player-wrapper .small-button {
    width: clamp(var(--small-btn-min), 18cqw, var(--small-btn-max));
    min-width: var(--small-btn-min);
    min-height: var(--small-btn-min);
    aspect-ratio: 1 / 1;
    background: #ffffff;
    color: #667eea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    font-size: clamp(12px, 8cqw, 20px);
    transition: all var(--button-hover-duration) var(--ease-smooth);
}

.modern-audio-player-wrapper .small-button:hover {
    background: #ffffff;
    color: #764ba2;
    transform: scale(1.08) translateZ(0);
}

.modern-audio-player-wrapper .small-button:focus {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25),
        0 0 0 3px rgba(102, 126, 234, 0.3);
}

.modern-audio-player-wrapper .small-button svg {
    width: 1em;
    height: 1em;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

/**
 * Play Button
 */
.modern-audio-player-wrapper .play-btn {
    width: clamp(var(--play-btn-min), 24cqw, var(--play-btn-max));
    min-width: var(--play-btn-min);
    min-height: var(--play-btn-min);
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    font-size: clamp(16px, 10cqw, 28px);
    transition: all var(--button-hover-duration) var(--ease-smooth);
}

.modern-audio-player-wrapper .play-btn:hover {
    filter: brightness(1.1);
    transform: scale(1.06) translateZ(0);
}

.modern-audio-player-wrapper .play-btn:focus {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5),
        0 0 0 3px rgba(255, 255, 255, 0.4);
}

/**
 * Play/Pause Icons
 */
.modern-audio-player-wrapper .play-triangle {
    width: 0;
    height: 0;
    border-left: 18px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 6px;
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
}

.modern-audio-player-wrapper .pause-bars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.modern-audio-player-wrapper .pause-bar {
    width: 4px;
    height: 16px;
    background-color: white;
    border-radius: 1px;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/**
 * Volume Control
 */
.modern-audio-player-wrapper .volume-control {
    position: relative;
    display: inline-block;
}

.modern-audio-player-wrapper .volume-popup {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    z-index: 100000 !important;
}

.modern-audio-player-wrapper .volume-control:hover .volume-popup,
.modern-audio-player-wrapper .volume-control:focus-within .volume-popup {
    display: block;
}

.modern-audio-player-wrapper .volume-slider {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    touch-action: none;
}

.modern-audio-player-wrapper .volume-popup-bg {
    fill: #ffffff;
}

.modern-audio-player-wrapper .volume-track-bg {
    fill: rgba(0, 0, 0, 0.1);
}

.modern-audio-player-wrapper .volume-track-fill {
    fill: var(--gradient-start, #667eea);
    transition: y var(--volume-slider-transition) ease,
        height var(--volume-slider-transition) ease;
    will-change: transform;
}

.modern-audio-player-wrapper .volume-thumb {
    fill: white;
    stroke: var(--gradient-start, #667eea);
    stroke-width: 3;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: cy var(--volume-slider-transition) ease;
    cursor: pointer;
    will-change: transform;
}

.modern-audio-player-wrapper .volume-slider:hover .volume-thumb {
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
}

.modern-audio-player-wrapper .volume-slider:active .volume-thumb,
.modern-audio-player-wrapper .volume-slider.dragging .volume-thumb {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

/**
 * Volume Indicator (On-Screen Display)
 */
.volume-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8) translateZ(0);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    pointer-events: none;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 1000;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.volume-indicator.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateZ(0);
}

/**
 * Progress Bar
 */
.modern-audio-player-wrapper .progress-section {
    margin: 0;
}

.modern-audio-player-wrapper .progress-container {
    width: 100%;
    height: 8px;
    background: #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    overflow: visible;
}

.modern-audio-player-wrapper .progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width var(--volume-slider-transition) linear;
    position: relative;
}

.modern-audio-player-wrapper .progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%) translateZ(0);
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    overflow: visible;
    will-change: transform;
    backface-visibility: hidden;
}

.modern-audio-player-wrapper .time-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    font-size: 11px;
    color: #999;
}

/**
 * Miscellaneous Base Elements
 */
.modern-audio-player-wrapper .audio-element {
    display: none;
}

.modern-audio-player-wrapper .no-tracks-message {
    margin-top: 20px;
    color: #666;
}

.modern-audio-player-wrapper .editor-preview-note {
    margin-top: 15px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
    font-size: 12px;
    color: #666;
}

.track-artist {
    font-weight: 400;
}

html {
    scrollbar-gutter: stable;
}

/**
 * Track List
 */
.modern-audio-player-wrapper .track-list {
    text-align: left;
    margin: 0;
    scroll-behavior: smooth;
    position: relative;
}

.modern-audio-player-wrapper .track-item-wrapper {
    position: relative;
    overflow: hidden;
    transition: opacity 0.4s var(--ease-out);
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, opacity;
}

.modern-audio-player-wrapper .track-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--track-separator-color);
    border-left: 4px solid transparent;
    color: #333;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.modern-audio-player-wrapper .track-item strong {
    color: inherit;
    transition: color 0.2s ease;
}

.modern-audio-player-wrapper .track-item:hover,
.modern-audio-player-wrapper .track-item.active {
    color: #111;
}

.modern-audio-player-wrapper .track-item:hover {
    background: #f5f5f5;
}

.modern-audio-player-wrapper .track-item.active {
    background: #e8f2ff;
    border-left-color: #667eea;
}

/**
 * Song Cover Thumbnail
 */
.modern-audio-player-wrapper .song-cover-thumb {
    margin-right: 5px;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.modern-audio-player-wrapper .song-cover-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modern-audio-player-wrapper .track-item {
    margin-top: 20px;
}

/**
 * Song Cover Expanded
 */
.modern-audio-player-wrapper .song-cover-expanded {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height var(--cover-open-duration) var(--ease-out),
                padding var(--cover-open-duration) var(--ease-out);
    will-change: max-height;
}

.modern-audio-player-wrapper .track-item-wrapper.active.cover-open .song-cover-expanded {
    max-height: 350px;
    padding: 12px 0;
}

.modern-audio-player-wrapper .song-cover-expanded img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modern-audio-player-wrapper.playing .track-item-wrapper.active .song-cover-expanded img,
.modern-audio-player-wrapper.paused .track-item-wrapper.active .song-cover-expanded img {
    animation: none !important;
}

/**
 * Smooth Track List Animations
 */
.modern-audio-player-wrapper .track-item-wrapper.fading-down-smooth {
    animation: fadeDownSmoothly var(--track-fade-duration) var(--ease-out) forwards;
    pointer-events: none;
}

@keyframes fadeDownSmoothly {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
}

.modern-audio-player-wrapper .track-item-wrapper.sliding-up-smooth {
    animation: slideUpSmoothly var(--track-slide-duration) var(--ease-smooth);
}

@keyframes slideUpSmoothly {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

.modern-audio-player-wrapper .track-item-wrapper.appearing-bottom-smooth {
    animation: appearBottomSmoothly var(--track-appear-duration) var(--ease-in);
}

@keyframes appearBottomSmoothly {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.modern-audio-player-wrapper .track-item-wrapper.batch-fade-out-smooth {
    animation: batchFadeOut var(--batch-fade-duration) var(--ease-out) forwards;
    pointer-events: none;
}

@keyframes batchFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
}

.modern-audio-player-wrapper .track-item-wrapper.fading-down-smooth,
.modern-audio-player-wrapper .track-item-wrapper.sliding-up-smooth,
.modern-audio-player-wrapper .track-item-wrapper.batch-fade-out-smooth,
.modern-audio-player-wrapper .track-item-wrapper.fading-out-smooth {
    transform: translateZ(0) !important;
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/**
 * Download Popup
 */
.map-download-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    transition: all var(--popup-transition) ease;
}

.map-download-popup-overlay.show {
    background: rgba(0, 0, 0, 0.75);
    opacity: 1;
}

.map-download-popup {
    background: #fff;
    border-radius: 8px;
    padding: 15px 20px;
    max-width: 280px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(30px) scale(0.9);
    transition: all var(--popup-transition) ease;
}

.map-download-popup-overlay.show .map-download-popup {
    transform: translateY(0) scale(1);
}

.map-popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.map-popup-icon {
    margin-bottom: 8px;
}

.map-popup-icon svg {
    width: 32px;
    height: 32px;
    stroke: #3498db;
}

.map-download-popup h3 {
    margin: 0 0 6px;
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

.map-download-popup p {
    margin: 0 0 12px;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

.map-popup-ok {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border: none;
    padding: 8px 22px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--popup-transition);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.map-popup-ok:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

/**
 * Collapse Mode - Fixed Image Size
 */
.modern-audio-player-wrapper[data-cover-animation='collapse'] .song-cover-expanded {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.modern-audio-player-wrapper[data-cover-animation='collapse'] .song-cover-expanded img {
    width: 280px !important;
    height: 280px !important;
    max-width: 280px;
    max-height: 280px;
    object-fit: cover;
    border-radius: 12px;
}

/**
 * Slide-Through Mode - Track List Animation
 */
.modern-audio-player-wrapper[data-cover-animation='slide-through'] .song-cover-expanded img {
    width: 280px !important;
    height: 280px !important;
    max-width: 280px;
    max-height: 280px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.modern-audio-player-wrapper[data-cover-animation='slide-through']
    .track-item-wrapper:first-child.cover-open {
    height: 304px;
    transition: all var(--cover-close-duration) var(--ease-smooth) !important;
}

.modern-audio-player-wrapper[data-cover-animation='slide-through']
    .track-item-wrapper:first-child:not(.cover-open) {
    height: auto;
    transition: all var(--cover-close-duration) var(--ease-smooth) !important;
}

.modern-audio-player-wrapper[data-cover-animation='slide-through']
    .track-item-wrapper:first-child {
    position: relative;
    overflow: hidden;
}

.modern-audio-player-wrapper[data-cover-animation='slide-through'] .song-cover-expanded {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(0);
    opacity: 1;
    transition: none;
    z-index: 5;
}

.modern-audio-player-wrapper[data-cover-animation='slide-through'] .song-cover-expanded.entering {
    animation: slideEnter var(--cover-close-duration) var(--ease-smooth) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='slide-through'] .song-cover-expanded.exiting {
    animation: slideExit var(--cover-close-duration) var(--ease-smooth) forwards;
    z-index: 10;
}

@keyframes slideEnter {
    0% {
        transform: translateX(100%);
        opacity: 1;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideExit {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 1;
    }
}

.modern-audio-player-wrapper[data-cover-animation='slide-through']:not(.has-open-cover)
    .track-item-wrapper:first-child.cover-open
    .song-cover-expanded {
    animation: firstCoverAppear 0.6s var(--ease-smooth) forwards;
}

@keyframes firstCoverAppear {
    0% {
        opacity: 0;
        transform: translateX(0) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.modern-audio-player-wrapper[data-cover-animation='slide-through'] .track-item-wrapper {
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    transform: translateZ(0);
}

.modern-audio-player-wrapper[data-cover-animation='slide-through']
    .track-item-wrapper:not(:first-child)
    .song-cover-expanded {
    display: none;
}

/**
 * Carousel Mode - Dedicated Cover Area
 */
.modern-audio-player-wrapper[data-cover-animation] .cover-carousel-container {
    width: 100%;
    height: 0;
    overflow: hidden;
    position: relative;
    background: transparent !important;
    border-radius: 12px 12px 0 0;
    margin-bottom: 0;
    transition: all var(--carousel-height-transition) var(--ease-smooth) !important;
    will-change: transform, height;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.modern-audio-player-wrapper[data-cover-animation].carousel-open .cover-carousel-container {
    height: 320px;
    margin-bottom: -20px;
}

.modern-audio-player-wrapper[data-cover-animation] .cover-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    perspective: 1200px;
}

.modern-audio-player-wrapper[data-cover-animation] .carousel-cover-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    opacity: 0;
    pointer-events: none;
    transition: none;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    will-change: transform, opacity;
}

.modern-audio-player-wrapper[data-cover-animation='vinyl-spin'] .carousel-cover-item {
    border-radius: 50% !important;
}

.modern-audio-player-wrapper[data-cover-animation] .carousel-cover-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modern-audio-player-wrapper[data-cover-animation] .carousel-cover-item.active {
    opacity: 1;
    z-index: 10;
}

/**
 * Carousel Animations - Slide-Through
 */
.modern-audio-player-wrapper[data-cover-animation='slide-through'] .carousel-cover-item.entering {
    animation: carouselSlideIn var(--carousel-slide-duration) var(--ease-smooth) forwards;
    z-index: 20;
    opacity: 1;
}

.modern-audio-player-wrapper[data-cover-animation='slide-through'] .carousel-cover-item.exiting {
    animation: carouselSlideOut var(--carousel-slide-duration) var(--ease-smooth) forwards;
    z-index: 5;
    opacity: 1;
}

@keyframes carouselSlideIn {
    0% {
        transform: translate(150%, -50%);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes carouselSlideOut {
    0% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
    100% {
        transform: translate(-250%, -50%);
        opacity: 1;
    }
}

/**
 * Carousel Animations - Rotate Y-Axis
 */
.modern-audio-player-wrapper[data-cover-animation='rotate-y'] .carousel-cover-item.entering {
    animation: rotateInY var(--carousel-rotate-duration) var(--ease-in-out) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='rotate-y'] .carousel-cover-item.exiting {
    animation: rotateOutY var(--carousel-rotate-duration) var(--ease-in-out) forwards;
    z-index: 5;
}

@keyframes rotateOutY {
    0% {
        transform: translate(-50%, -50%) rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotateY(90deg);
        opacity: 0;
    }
}

@keyframes rotateInY {
    0% {
        transform: translate(-50%, -50%) rotateY(-90deg);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) rotateY(0deg);
        opacity: 1;
    }
}

/**
 * Carousel Animations - Fade & Scale
 */
.modern-audio-player-wrapper[data-cover-animation='fade-scale'] .carousel-cover-item.entering {
    animation: fadeScaleIn var(--carousel-fade-duration) var(--ease-out) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='fade-scale'] .carousel-cover-item.exiting {
    animation: fadeScaleOut var(--carousel-fade-duration) var(--ease-in) forwards;
    z-index: 5;
}

@keyframes fadeScaleOut {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0;
    }
}

@keyframes fadeScaleIn {
    0% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/**
 * Carousel Animations - 3D Flip
 */
.modern-audio-player-wrapper[data-cover-animation='flip-3d'] .carousel-cover-item.entering {
    animation: flip3DIn var(--carousel-flip-duration) var(--ease-in-out) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='flip-3d'] .carousel-cover-item.exiting {
    animation: flip3DOut var(--carousel-flip-duration) var(--ease-in-out) forwards;
    z-index: 5;
}

@keyframes flip3DOut {
    0% {
        transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) rotateX(90deg) rotateY(45deg);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) rotateX(180deg) rotateY(90deg);
        opacity: 0;
    }
}

@keyframes flip3DIn {
    0% {
        transform: translate(-50%, -50%) rotateX(-180deg) rotateY(-90deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) rotateX(-90deg) rotateY(-45deg);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg);
        opacity: 1;
    }
}

/**
 * Carousel Animations - Vinyl Spin
 */
.modern-audio-player-wrapper[data-cover-animation='vinyl-spin'] .carousel-cover-item {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

.modern-audio-player-wrapper[data-cover-animation='vinyl-spin'] .carousel-cover-item.active {
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

.modern-audio-player-wrapper[data-cover-animation='vinyl-spin'] .carousel-cover-item.entering {
    animation: vinylSpinIn var(--carousel-vinyl-duration) var(--ease-smooth) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='vinyl-spin'] .carousel-cover-item.exiting {
    animation: vinylSpinOut var(--carousel-vinyl-duration) var(--ease-smooth) forwards;
    z-index: 5;
}

@keyframes vinylSpinOut {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(0.3);
        opacity: 0;
    }
}

@keyframes vinylSpinIn {
    0% {
        transform: translate(-50%, -50%) rotate(-360deg) scale(0.3);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        opacity: 1;
    }
}

/**
 * Carousel Animations - Door Swing
 */
.modern-audio-player-wrapper[data-cover-animation='door-swing'] .carousel-cover-item {
    transform-origin: left center;
}

.modern-audio-player-wrapper[data-cover-animation='door-swing'] .carousel-cover-item.entering {
    animation: doorSwingIn var(--carousel-door-duration) var(--ease-smooth) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='door-swing'] .carousel-cover-item.exiting {
    animation: doorSwingOut var(--carousel-door-duration) var(--ease-smooth) forwards;
    z-index: 5;
}

@keyframes doorSwingOut {
    0% {
        transform: translate(-50%, -50%) rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-140%, -50%) rotateY(-120deg);
        opacity: 0;
    }
}

@keyframes doorSwingIn {
    0% {
        transform: translate(40%, -50%) rotateY(120deg);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) rotateY(0deg);
        opacity: 1;
    }
}

/**
 * Carousel Animations - Zoom Blur
 */
.modern-audio-player-wrapper[data-cover-animation='zoom-blur'] .carousel-cover-item.entering {
    animation: zoomBlurIn var(--carousel-zoom-duration) var(--ease-out) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='zoom-blur'] .carousel-cover-item.exiting {
    animation: zoomBlurOut var(--carousel-zoom-duration) var(--ease-in) forwards;
    z-index: 5;
}

@keyframes zoomBlurOut {
    0% {
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0px);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        filter: blur(20px);
        opacity: 0;
    }
}

@keyframes zoomBlurIn {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        filter: blur(20px);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0px);
        opacity: 1;
    }
}

/**
 * Carousel Animations - Glitch Effect
 */
.modern-audio-player-wrapper[data-cover-animation='glitch'] .carousel-cover-item.entering {
    animation: glitchIn var(--carousel-glitch-duration) steps(8) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='glitch'] .carousel-cover-item.exiting {
    animation: glitchOut var(--carousel-glitch-duration) steps(8) forwards;
    z-index: 5;
}

@keyframes glitchOut {
    0%, 100% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
    10% {
        transform: translate(-48%, -52%);
        opacity: 0.9;
    }
    20% {
        transform: translate(-52%, -48%);
        opacity: 0.8;
    }
    30% {
        transform: translate(-49%, -51%);
        opacity: 0.6;
    }
    40% {
        transform: translate(-51%, -49%);
        opacity: 0.4;
    }
    50% {
        transform: translate(-47%, -53%);
        opacity: 0.3;
    }
    60% {
        transform: translate(-53%, -47%);
        opacity: 0.2;
    }
    70% {
        transform: translate(-50%, -50%);
        opacity: 0.1;
    }
    80%, 100% {
        transform: translate(-50%, -50%);
        opacity: 0;
    }
}

@keyframes glitchIn {
    0% {
        transform: translate(-50%, -50%);
        opacity: 0;
    }
    10% {
        transform: translate(-48%, -52%);
        opacity: 0.1;
    }
    20% {
        transform: translate(-52%, -48%);
        opacity: 0.3;
    }
    30% {
        transform: translate(-49%, -51%);
        opacity: 0.5;
    }
    40% {
        transform: translate(-51%, -49%);
        opacity: 0.7;
    }
    50% {
        transform: translate(-47%, -53%);
        opacity: 0.8;
    }
    60% {
        transform: translate(-53%, -47%);
        opacity: 0.9;
    }
    70%, 100% {
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

/**
 * Carousel Animations - Wave/Ripple
 */
.modern-audio-player-wrapper[data-cover-animation='wave'] .carousel-cover-item.entering {
    animation: waveIn var(--carousel-wave-duration) var(--ease-smooth) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='wave'] .carousel-cover-item.exiting {
    animation: waveOut var(--carousel-wave-duration) var(--ease-smooth) forwards;
    z-index: 5;
}

@keyframes waveOut {
    0% {
        transform: translate(-50%, -50%) rotateX(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) rotateX(20deg) scale(0.9);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) rotateX(0deg) scale(0.7);
        opacity: 0;
    }
}

@keyframes waveIn {
    0% {
        transform: translate(-50%, -50%) rotateX(0deg) scale(1.3);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) rotateX(-20deg) scale(1.1);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) rotateX(0deg) scale(1);
        opacity: 1;
    }
}

/**
 * Carousel Animations - Parallax Layers
 */
.modern-audio-player-wrapper[data-cover-animation='parallax'] .carousel-cover-item.entering {
    animation: parallaxIn var(--carousel-parallax-duration) var(--ease-smooth) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='parallax'] .carousel-cover-item.exiting {
    animation: parallaxOut var(--carousel-parallax-duration) var(--ease-smooth) forwards;
    z-index: 5;
}

@keyframes parallaxOut {
    0% {
        transform: translate(-50%, -50%) translateZ(0px);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) translateZ(-500px);
        opacity: 0;
    }
}

@keyframes parallaxIn {
    0% {
        transform: translate(-50%, -50%) translateZ(500px);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) translateZ(0px);
        opacity: 1;
    }
}

/**
 * Carousel Animations - Stack Shuffle
 */
.modern-audio-player-wrapper[data-cover-animation='stack-shuffle'] .carousel-cover-item.entering {
    animation: stackShuffleIn var(--carousel-stack-duration) var(--ease-smooth) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='stack-shuffle'] .carousel-cover-item.exiting {
    animation: stackShuffleOut var(--carousel-stack-duration) var(--ease-smooth) forwards;
    z-index: 5;
}

@keyframes stackShuffleOut {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: translate(-30%, -50%) rotate(-15deg);
        opacity: 0.5;
    }
    100% {
        transform: translate(-150%, -50%) rotate(-45deg);
        opacity: 0;
    }
}

@keyframes stackShuffleIn {
    0% {
        transform: translate(50%, -50%) rotate(15deg);
        opacity: 0;
    }
    50% {
        transform: translate(-30%, -50%) rotate(5deg);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) rotate(0deg);
        opacity: 1;
    }
}

/**
 * Carousel Animations - Vortex
 */
.modern-audio-player-wrapper[data-cover-animation='vortex'] .carousel-cover-item.entering {
    animation: vortexIn var(--carousel-vortex-duration) var(--ease-smooth) forwards;
    z-index: 20;
}

.modern-audio-player-wrapper[data-cover-animation='vortex'] .carousel-cover-item.exiting {
    animation: vortexOut var(--carousel-vortex-duration) var(--ease-smooth) forwards;
    z-index: 5;
}

@keyframes vortexOut {
    0% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes vortexIn {
    0% {
        transform: translate(-50%, -50%) scale(3) rotate(-360deg);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
        opacity: 1;
    }
}

/**
 * Settings Panel
 */
.modern-audio-player-wrapper .settings-panel {
    position: absolute;
    top: 8px;
    right: -220px;
    width: 220px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
    transition: right var(--settings-transition) var(--ease-smooth),
        opacity var(--settings-transition) ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    font-family: 'Poppins', sans-serif;
    transform: translateZ(0);
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.modern-audio-player-wrapper .settings-panel.open {
    right: 8px;
    opacity: 1;
    pointer-events: all;
}

.modern-audio-player-wrapper .settings-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.modern-audio-player-wrapper .settings-panel-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: -0.2px;
    font-family: 'Poppins', sans-serif;
}

.modern-audio-player-wrapper .settings-panel-header h4 svg {
    width: 12px;
    height: 12px;
    color: #aaa;
}

.modern-audio-player-wrapper .settings-close {
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.04);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    color: #999;
    font-size: 20px;
    line-height: 1;
    font-weight: 300;
}

.modern-audio-player-wrapper .settings-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: scale(1.05);
}

.modern-audio-player-wrapper .settings-close:active {
    transform: scale(0.95);
}

.modern-audio-player-wrapper .settings-panel-content {
    padding: 10px 12px 12px;
}

.modern-audio-player-wrapper .setting-item {
    margin-bottom: 12px;
}

.modern-audio-player-wrapper .setting-item:last-child {
    margin-bottom: 0;
}

.modern-audio-player-wrapper .setting-label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    font-size: 9px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.modern-audio-player-wrapper .setting-label svg {
    width: 11px;
    height: 11px;
    color: #bbb;
    opacity: 0.7;
}

.modern-audio-player-wrapper .setting-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modern-audio-player-wrapper .setting-option {
    display: flex;
    align-items: center;
    padding: 6px 9px;
    background: #fafafa;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    position: relative;
}

.modern-audio-player-wrapper .setting-option:hover {
    background: #f5f5f5;
}

.modern-audio-player-wrapper .setting-option.active {
    background: #fafafa;
    border-color: transparent;
}

.modern-audio-player-wrapper .setting-option input[type='radio'] {
    display: none;
}

.modern-audio-player-wrapper .setting-option.active::after {
    content: '✓';
    position: absolute;
    right: 10px;
    font-size: 14px;
    color: #10b981;
    font-weight: 600;
}

.modern-audio-player-wrapper .setting-option label {
    flex: 1;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    line-height: 1.3;
    padding-right: 24px;
    text-align: left;
}

.modern-audio-player-wrapper .setting-option.active label {
    color: #333;
    font-weight: 500;
}

.modern-audio-player-wrapper .setting-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 9px;
    background: #fafafa;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.modern-audio-player-wrapper .setting-toggle:hover {
    background: #f5f5f5;
}

.modern-audio-player-wrapper .setting-toggle label {
    font-size: 12px;
    color: #666;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    line-height: 1.3;
    text-align: left;
    flex: 1;
}

.modern-audio-player-wrapper .toggle-switch {
    position: relative;
    width: 32px;
    height: 18px;
    background: #e0e0e0;
    border-radius: 9px;
    transition: background 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 8px;
}

.modern-audio-player-wrapper .toggle-switch::after {
    content: '';
    position: absolute;
    top: 2.5px;
    left: 2.5px;
    width: 13px;
    height: 13px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s var(--ease-smooth);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.modern-audio-player-wrapper .toggle-switch.active {
    background: #667eea;
}

.modern-audio-player-wrapper .toggle-switch.active::after {
    transform: translateX(14px);
}

.modern-audio-player-wrapper .setting-toggle input[type='checkbox'] {
    display: none;
}

.modern-audio-player-wrapper .settings-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    opacity: 0;
    pointer-events: none;
    transition: all var(--settings-transition) ease;
    z-index: 99;
}

.modern-audio-player-wrapper .settings-overlay.visible {
    background: rgba(0, 0, 0, 0.1);
    opacity: 1;
    pointer-events: all;
}

/**
 * Compact Mode - Hide All Covers
 */
.modern-audio-player-wrapper.compact-mode .album-cover-thumb {
    display: none;
}

.modern-audio-player-wrapper.compact-mode .song-cover-thumb {
    display: none;
}

.modern-audio-player-wrapper.compact-mode .song-cover-expanded {
    display: none !important;
}

.modern-audio-player-wrapper.compact-mode .cover-carousel-container {
    display: none !important;
}

.modern-audio-player-wrapper.compact-mode .player-title {
    flex: 1;
    text-align: center;
    padding: 0 50px;
}

.modern-audio-player-wrapper.compact-mode .player-title h3 {
    padding: 10px;
}

.modern-audio-player-wrapper.compact-mode .track-item-wrapper {
    pointer-events: auto;
}

/**
 * Firefox Mobile Fallback
 */
@supports not (container-type: inline-size) {
    .modern-audio-player-wrapper .play-btn {
        width: 55px !important;
        min-width: 55px !important;
        height: 55px !important;
        font-size: 20px !important;
    }

    .modern-audio-player-wrapper .small-button {
        width: 42px !important;
        min-width: 42px !important;
        height: 42px !important;
        font-size: 16px !important;
    }
}

/**
 * Responsive - Mobile (≤480px)
 */
@media (max-width: 480px) {
    .modern-audio-player-wrapper {
        --play-btn-min: 45px;
        --small-btn-min: 32px;
    }

    .modern-audio-player-wrapper::before {
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
    }

    .modern-audio-player-wrapper .album-cover-thumb {
        width: 40px;
        height: 40px;
    }

    .modern-audio-player-wrapper .album-cover-popup.scaling {
        width: 280px;
        height: 280px;
    }

    .modern-audio-player-wrapper .song-cover-thumb {
        width: 35px;
        height: 35px;
    }

    .modern-audio-player-wrapper .player-title h3 {
        font-size: 18px;
        padding: 8px 45px 8px 50px;
    }

    .modern-audio-player-wrapper .settings-panel {
        width: calc(100% - 16px);
        right: -100%;
        border-radius: 10px;
        top: 8px;
    }

    .modern-audio-player-wrapper .settings-panel.open {
        right: 8px;
    }

    .modern-audio-player-wrapper .settings-button {
        width: 30px;
        height: 30px;
    }

    .modern-audio-player-wrapper .settings-button svg {
        width: 15px;
        height: 15px;
    }

    .modern-audio-player-wrapper[data-cover-animation='collapse'] .song-cover-expanded img {
        width: 220px !important;
        height: 220px !important;
        max-width: 220px;
        max-height: 220px;
    }

    .modern-audio-player-wrapper[data-cover-animation='slide-through'] .song-cover-expanded img {
        width: 220px !important;
        height: 220px !important;
        max-width: 220px;
        max-height: 220px;
    }

    .modern-audio-player-wrapper[data-cover-animation='slide-through']
        .track-item-wrapper:first-child.cover-open {
        height: 244px;
    }

    .modern-audio-player-wrapper .album-cover-popup {
        padding: 15px;
    }

    .modern-audio-player-wrapper .album-cover-popup img {
        max-width: 100%;
        border-radius: 12px;
    }

    .modern-audio-player-wrapper .close-cover {
        top: 15px;
        right: 15px;
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        font-size: 18px;
    }
}

/**
 * Responsive - Small Mobile (≤380px)
 */
@media (max-width: 380px) {
    .modern-audio-player-wrapper .album-cover-popup {
        padding: 10px;
    }

    .modern-audio-player-wrapper .album-cover-popup img {
        border-radius: 10px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 8px 25px rgba(0, 0, 0, 0.5);
    }
}

/**
 * Responsive - Tablet Small (≤768px)
 */
@media (max-width: 768px) {
    .modern-audio-player-wrapper {
        --play-btn-min: 50px;
        --small-btn-min: 36px;
    }

    .modern-audio-player-wrapper .player-title h3 {
        padding: 10px 50px 10px 55px;
    }

    .modern-audio-player-wrapper[data-cover-animation].carousel-open .cover-carousel-container {
        height: 260px !important;
        margin-bottom: -20px;
    }

    .modern-audio-player-wrapper[data-cover-animation] .carousel-cover-item {
        width: 220px !important;
        height: 220px !important;
    }

    .modern-audio-player-wrapper[data-cover-animation='vinyl-spin'] .carousel-cover-item {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
        border-radius: 50%;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        opacity: 0;
        pointer-events: none;
        transition: none;
        backface-visibility: hidden;
        will-change: transform, opacity;
    }

    .modern-audio-player-wrapper[data-cover-animation='vinyl-spin'] .carousel-cover-item.active {
        opacity: 1;
        z-index: 10;
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }

    .modern-audio-player-wrapper[data-cover-animation='vinyl-spin'] .carousel-cover-item.entering {
        animation: vinylSpinIn var(--carousel-vinyl-duration) var(--ease-smooth) both;
        z-index: 20;
    }

    .modern-audio-player-wrapper[data-cover-animation='vinyl-spin'] .carousel-cover-item.exiting {
        animation: vinylSpinOut var(--carousel-vinyl-duration) var(--ease-smooth) both;
        z-index: 5;
    }
}

/**
 * Responsive - Tablet Landscape Mobile (768px-1024px, landscape)
 */
@media (max-width: 768px) and (orientation: landscape) {
    .modern-audio-player-wrapper .album-cover-popup img {
        max-width: 60vh;
        max-height: 85vh;
    }
}

/**
 * Responsive - Tablet Medium (768px-1024px)
 */
@media (max-width: 1024px) and (min-width: 768px) {
    .modern-audio-player-wrapper .current-track-display {
        padding: 12px;
        margin: 12px 0;
    }

    .modern-audio-player-wrapper .progress-section {
        margin: 15px 0;
    }

    .modern-audio-player-wrapper .track-list {
        margin: 15px 0;
    }
}