/* Modern Audio Player Styles for World FM Radio */

/* --- Custom Audio Player Styles --- */
.custom-player {
    border-radius: 16px;
    overflow: hidden;
    background: var(--player-bg, #121212);
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    max-width: 100%;
    margin: 0 auto;
}

.custom-player::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(var(--button-bg-rgb, 3, 169, 244), 0.05), transparent);
    z-index: -1;
}

.custom-player::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

/* Playing state effect */
.custom-player.is-playing {
    box-shadow: 0 10px 30px rgba(var(--button-bg-rgb, 3, 169, 244), 0.15);
    transform: translateY(-2px);
}

.custom-player.is-playing::before {
    background: linear-gradient(45deg, rgba(var(--button-bg-rgb, 3, 169, 244), 0.1), transparent);
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    position: relative;
}

.control-btn {
    background: var(--button-bg, #03A9F4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.control-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.control-btn:hover {
    background: var(--button-hover-bg, #0288D1);
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.control-btn:hover::after {
    opacity: 1;
}

.control-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.control-btn i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

#playPauseBtn {
    position: relative;
    z-index: 2;
}

#playPauseBtn::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: -1;
}

#playPauseBtn:hover::before {
    transform: scale(1.5);
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    padding: 0 5px;
}

.volume-slider-container {
    width: 100px;
    position: relative;
    overflow: visible;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 6px;
    background: linear-gradient(to right, 
        var(--button-bg, #03A9F4) 0%, 
        var(--button-bg, #03A9F4) var(--volume-percent, 80%), 
        rgba(255, 255, 255, 0.2) var(--volume-percent, 80%), 
        rgba(255, 255, 255, 0.2) 100%);
    outline: none;
    transition: background 0.3s ease;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--button-bg, #03A9F4);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.volume-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--button-bg, #03A9F4);
}

.station-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-grow: 1;
    margin-left: 10px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    padding: 8px 15px;
    transition: all 0.3s ease;
}

.station-info:hover {
    background: rgba(var(--button-bg-rgb, 3, 169, 244), 0.1);
}

.station-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--button-bg, #03A9F4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.station-logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
}

/* Pulse animation for station logo when playing */
.pulse-animation {
    animation: pulse-effect 2s infinite;
}

@keyframes pulse-effect {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--button-bg-rgb, 3, 169, 244), 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(var(--button-bg-rgb, 3, 169, 244), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--button-bg-rgb, 3, 169, 244), 0);
    }
}

.now-playing-text {
    font-size: var(--font-size-md, 1rem);
    font-weight: var(--font-weight-medium, 500);
    color: var(--player-text, white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 55px);
    transition: all 0.3s ease;
    animation: pulseText 2s infinite alternate;
}

@keyframes pulseText {
    from { opacity: 0.8; }
    to { opacity: 1; }
}

/* --- Audio Visualization Styles --- */
.audio-visualization {
    width: 100%;
    height: 140px;
    background: rgba(0, 0, 0, 0.85);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.7);
    margin-top: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
}

.audio-visualization::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
    z-index: 2;
}

.audio-visualization::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    right: 10%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(var(--button-bg-rgb, 3, 169, 244), 0.3) 0%, transparent 70%);
    filter: blur(8px);
    border-radius: 50%;
    z-index: 1;
}

#audioVisualization {
    width: 100%;
    height: 100%;
    display: block;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .custom-player {
        padding: 15px;
    }
    
    .control-btn {
        width: 44px;
        height: 44px;
    }
    
    .volume-slider-container {
        width: 80px;
    }
    
    .player-controls {
        gap: 15px;
    }
    
    .station-info {
        padding: 6px 12px;
    }
}

@media (max-width: 576px) {
    .custom-player {
        padding: 12px;
    }
    
    .player-controls {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
    }
    
    .volume-slider-container {
        width: 60px;
    }
    
    .station-info {
        flex-basis: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .audio-visualization {
        height: 120px;
    }
}
