/* ========================================
   PLAYER CONTAINER
======================================== */
.audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 12px 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.5s ease forwards;
}

.player-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* ========================================
   PLAYER CONTENT (Left) - NEW LUXURY LAYOUT
======================================== */
.player-content-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    min-width: 0;
}

/* Visual Side (Vinyl/Cover) */
.player-visual-side {
    position: relative;
    flex-shrink: 0;
}

.player-cover {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    /* Circle for Vinyl look */
    background: conic-gradient(from 0deg, #E11D48, #F472B6, #E11D48);
    border: 2px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 15px rgba(225, 29, 72, 0.4);
    animation: spin-vinyl 10s linear infinite;
    position: relative;
    z-index: 2;
}

.vinyl-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #111;
    border-radius: 50%;
    z-index: 3;
    border: 2px solid #fff;
}

@keyframes spin-vinyl {
    to {
        transform: rotate(360deg);
    }
}

/* Info Side (Text) */
.player-info-side {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

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

.player-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: #E11D48;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* EQ Bars Animation */
.mini-eq-bars {
    display: flex;
    gap: 2px;
    height: 10px;
    align-items: flex-end;
    margin-top: 4px;
    opacity: 0.6;
}

.mini-eq-bars span {
    width: 2px;
    background: #E11D48;
    border-radius: 2px;
    animation: bounce 0.5s infinite ease-in-out;
}

.mini-eq-bars span:nth-child(2) {
    animation-delay: 0.1s;
    height: 60%;
}

.mini-eq-bars span:nth-child(3) {
    animation-delay: 0.2s;
    height: 30%;
}

.mini-eq-bars span:nth-child(4) {
    animation-delay: 0.3s;
    height: 75%;
}

@keyframes bounce {

    0%,
    100% {
        height: 10%;
    }

    50% {
        height: 100%;
    }
}

/* ========================================
   PLAYER CONTROLS (Center)
======================================== */
.player-controls {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-shrink: 0;
}

.player-share-btn {
    color: var(--text-muted);
    padding: 8px;
    transition: var(--transition);
}

.player-share-btn:hover {
    color: var(--text);
}

/* Main Play Button */
.player-main-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(219, 53, 82, 0.4);
    transition: var(--transition);
}

.player-main-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(219, 53, 82, 0.5);
}

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

/* Volume Control */
.player-volume {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-volume-btn {
    color: var(--text-muted);
    padding: 4px;
    transition: var(--transition);
}

.player-volume-btn:hover {
    color: var(--text);
}

.volume-slider {
    width: 80px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border);
    border-radius: 2px;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(219, 53, 82, 0.5);
    transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border-radius: 50%;
    border: none;
    box-shadow: 0 0 10px rgba(219, 53, 82, 0.5);
}

/* ========================================
   PLAYER EXTRA (Right)
======================================== */
.player-extra {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: flex-end;
}

.player-error {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius);
    font-size: 0.75rem;
    color: #ef4444;
}

.player-mute-mobile {
    display: none;
    padding: 8px;
    color: var(--text-muted);
}

.player-embed-btn {
    font-size: 0.75rem;
}

.player-embed-btn span {
    display: inline;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 768px) {
    .audio-player {
        padding: 10px 0;
    }

    .player-inner {
        gap: 12px;
    }

    /* Vertical Layout for Mobile */
    .player-content-wrapper {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 8px;
    }

    .player-visual-side {
        margin-bottom: 2px;
    }

    /* Slightly smaller visual on mobile */
    .player-cover {
        width: 50px;
        height: 50px;
    }

    .player-info-side {
        align-items: center;
        /* Center text */
    }

    .player-title {
        font-size: 0.9rem;
        /* Scrolling logic */
        white-space: nowrap;
        overflow: visible;
        width: 100%;
    }

    .player-subtitle {
        font-size: 0.75rem;
    }

    /* Hide EQ bars on very small screens if needed, or keep */
    .mini-eq-bars {
        height: 8px;
    }

    /* Mobile Scrolling Title - Single Element Ticker */
    .player-title-container {
        width: 100%;
        overflow: hidden;
        mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
        -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
        display: flex;
        justify-content: center;
    }

    .player-title {
        width: max-content;
        animation: mobileTicker 15s linear infinite;
        padding-left: 100%;
        /* Start off-screen */
    }

    @keyframes mobileTicker {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(-200%);
        }
    }


    .player-controls {
        gap: 12px;
    }

    .player-share-btn {
        display: none;
    }

    .player-main-btn {
        width: 48px;
        height: 48px;
    }

    .player-volume {
        display: none;
    }

    .player-mute-mobile {
        display: block;
    }

    .player-embed-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .player-cover {
        width: 40px;
        height: 40px;
    }

    .player-live {
        font-size: 0.625rem;
    }

    .player-title {
        font-size: 0.8125rem;
    }

    .player-subtitle {
        font-size: 0.6875rem;
    }
}