/* Custom Audio Player Styles */
.custom-audio-player {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
    background: #000;
}

.player-img-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.player-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0.8;
}

/* Hover Effect: Zoom Image */
.music-card:hover .player-img-container img {
    transform: scale(1.1);
    opacity: 0.6;
}

/* Play Button Overlay */
.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.play-btn-overlay i {
    font-size: 24px;
    color: #fff;
    margin-left: 4px;
    /* Optik dengeleme */
    transition: all 0.3s ease;
}

.play-btn-overlay:hover {
    background: #374151;
    /* Theme Color */
    border-color: #374151;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Loading State for Overlay */
.play-btn-overlay.is-loading i {
    animation: fa-spin 1s infinite linear;
}

.play-btn-overlay.is-loading {
    background: #374151;
}

/* Playing State Styles */
.custom-audio-player.playing .play-btn-overlay {
    opacity: 0;
    pointer-events: none;
}

.custom-audio-player.playing .player-img-container img {
    transform: scale(1.05);
    opacity: 0.4;
}

/* Audio Controls (Visible only when playing or hovered) */
.audio-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    z-index: 5;
}

.music-card:hover .audio-controls,
.custom-audio-player.playing .audio-controls {
    opacity: 1;
    transform: translateY(0);
}

/* Progress Bar */
.progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: #374151;
    width: 0%;
    border-radius: 2px;
    position: relative;
    transition: width 0.1s linear;
}

.progress-bar::after {
    content: '';
    position: absolute;
    right: -4px;
    top: -3px;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s;
}

.progress-container:hover .progress-bar::after {
    opacity: 1;
}

/* Control Buttons Row */
.control-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
}

.mini-play-btn {
    cursor: pointer;
    font-size: 16px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
}

.mini-play-btn:hover {
    color: #374151;
}

.mini-play-btn.is-loading i {
    animation: fa-spin 1s infinite linear;
    color: #374151;
}

.time-display {
    font-variant-numeric: tabular-nums;
    font-family: 'Roboto', sans-serif;
    letter-spacing: 0.5px;
}

/* Rotating Disc Effect Animation for Image when playing */
@keyframes rot {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Equalizer Bars Animation */
.equalizer-viz {
    display: flex;
    align-items: flex-end;
    height: 15px;
    gap: 2px;
    position: absolute;
    bottom: 25px;
    /* Adjust based on layout */
    right: 15px;
    opacity: 0;
    transition: opacity 0.3s;
}

.custom-audio-player.playing .equalizer-viz {
    opacity: 1;
}

.equalizer-viz .bar {
    width: 3px;
    background: #374151;
    animation: eq-bounce 0s infinite alternate;
}

.custom-audio-player.playing .equalizer-viz .bar {
    animation-duration: 0.5s;
}

/* Different speeds for bars */
.equalizer-viz .bar:nth-child(1) {
    height: 6px;
    animation-duration: 0.4s;
}

.equalizer-viz .bar:nth-child(2) {
    height: 12px;
    animation-duration: 0.6s;
}

.equalizer-viz .bar:nth-child(3) {
    height: 8px;
    animation-duration: 0.35s;
}

.equalizer-viz .bar:nth-child(4) {
    height: 10px;
    animation-duration: 0.5s;
}

@keyframes eq-bounce {
    from {
        height: 3px;
    }

    to {
        height: 15px;
    }
}

/* =============================================
   STICKY PLAYER BAR
   ============================================= */
.sticky-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #121212;
    /* Darker black for premium feel */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px 0;
}

.sticky-player.active {
    transform: translateY(0);
}

.sticky-player__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 30px;
    max-width: 100%;
    margin: 0;
}

/* Track Info */
.sticky-player__info {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 240px;
    flex-shrink: 0;
}

.sticky-player__thumb {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sticky-player__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sticky-player__title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.sticky-player__artist {
    color: #b3b3b3;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Control Buttons */
.sticky-player__controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sticky-player__btn {
    background: none;
    border: none;
    color: #b3b3b3;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticky-player__btn:hover {
    color: #fff;
}

.sticky-player__btn--play {
    width: 48px;
    height: 48px;
    font-size: 20px;
    color: #fff;
    background: #374151;
    /* Vibrant Orange */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sticky-player__btn--play:hover {
    transform: scale(1.05);
    background: #ff6a2d;
}

/* Progress */
.sticky-player__progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.sticky-player__progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    cursor: pointer;
    position: relative;
}

.sticky-player__progress-fill {
    height: 100%;
    background: #374151;
    border-radius: 2px;
    width: 0%;
    position: relative;
}

/* Handle on Progress Bar */
.sticky-player__progress-fill::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: #374151;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: none;
}

.sticky-player__progress-bar:hover .sticky-player__progress-fill::after {
    display: block;
}

.sticky-player__time {
    color: #b3b3b3;
    font-size: 12px;
    min-width: 80px;
    text-align: right;
}

/* Volume */
.sticky-player__volume {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sticky-player__vol-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.sticky-player__vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #374151;
    border-radius: 50%;
    cursor: pointer;
}

/* Back to Top / Action on the right */
.sticky-player__back-top {
    width: 48px;
    height: 48px;
    background: #374151;
    color: #fff;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    margin-left: 10px;
}

.sticky-player__back-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 77, 0, 0.4);
}

/* =============================================
   RESPONSIVE – Sticky Player
   ============================================= */
@media (max-width: 768px) {
    .sticky-player__inner {
        flex-wrap: wrap;
        padding: 8px 16px;
        gap: 8px;
    }

    .sticky-player__info {
        min-width: 0;
        flex: 1;
    }

    .sticky-player__title {
        max-width: 120px;
    }

    .sticky-player__thumb {
        width: 40px;
        height: 40px;
    }

    .sticky-player__progress {
        order: 4;
        flex-basis: 100%;
    }

    .sticky-player__volume {
        display: none;
    }
}

@media (max-width: 480px) {
    .sticky-player__inner {
        padding: 6px 12px;
    }

    .sticky-player__info {
        gap: 8px;
    }

    .sticky-player__title {
        font-size: 12px;
        max-width: 100px;
    }

    .sticky-player__artist {
        display: none;
    }

    .sticky-player__time {
        display: none;
    }
}