/* Player de Rádio - Estilos */
.radio-player {
    position: fixed;
    z-index: 9999;
    width: 320px;
    max-width: 90vw;
    background: #31455A;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Posicionamento do player */
.radio-player[data-position="bottom-right"] {
    bottom: 20px;
    right: 20px;
}

.radio-player[data-position="bottom-left"] {
    bottom: 20px;
    left: 20px;
}

.radio-player[data-position="top-right"] {
    top: 20px;
    right: 20px;
}

.radio-player[data-position="top-left"] {
    top: 20px;
    left: 20px;
}

/* Tema claro */
.radio-player[data-theme="light"] {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

.radio-player[data-theme="light"] .radio-player-header {
    background: #f8f9fa;
}

.radio-player[data-theme="light"] .radio-btn {
    color: #333;
}

.radio-player[data-theme="light"] .radio-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Container do player */
.radio-player-container {
    padding: 0;
    overflow: hidden;
}

/* Header do player */
.radio-player-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.radio-station-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.radio-station-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.radio-station-logo i {
    color: white;
    font-size: 18px;
}

.radio-station-logo img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.radio-station-logo.playing {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.radio-station-details {
    flex: 1;
    min-width: 0;
}

.radio-station-name {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.radio-station-status {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.radio-station-status.playing {
    color: #4CAF50;
}

.radio-station-status.loading {
    color: #FF9800;
}

.radio-station-status.error {
    color: #F44336;
}

/* Controles do player */
.radio-player-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #ffffff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.radio-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.radio-btn:active {
    transform: scale(0.95);
}

.radio-btn.active {
    background: rgba(255, 255, 255, 0.2);
    color: #4CAF50;
}

/* Body do player */
.radio-player-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.radio-player-body.expanded {
    max-height: 300px;
}

/* Controle de volume */
.radio-volume-control {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.radio-volume-slider {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.radio-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.radio-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #4CAF50;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#radioVolumeValue {
    font-size: 12px;
    color: #888;
    min-width: 35px;
    text-align: right;
}



/* Player minimizado */
.radio-player.minimized {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
}

.radio-player.minimized .radio-player-body {
    display: none;
}

.radio-player.minimized .radio-player-header {
    padding: 0;
    background: transparent;
    border: none;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radio-player.minimized .radio-station-info {
    width: 100%;
    height: 100%;
    justify-content: center;
}

.radio-player.minimized .radio-station-logo {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.radio-player.minimized .radio-station-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.radio-player.minimized .radio-station-logo.playing {
    animation: pulse 2s infinite;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.radio-player.minimized .radio-station-details {
    display: none;
}

.radio-player.minimized .radio-player-controls {
    display: none;
}



/* Responsividade */
@media (max-width: 768px) {
    .radio-player {
        width: 280px;
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }
    
    .radio-player[data-position="bottom-left"],
    .radio-player[data-position="bottom-right"] {
        left: 10px;
        right: 10px;
        width: auto;
    }
    
    /* Player minimizado em dispositivos móveis */
    .radio-player.minimized {
        width: 56px;
        height: 56px;
        bottom: 15px;
        right: 15px;
        left: auto;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
    
    .radio-player.minimized[data-position="bottom-left"] {
        left: 15px;
        right: auto;
    }
    
    .radio-player.minimized[data-position="top-right"] {
        top: 15px;
        bottom: auto;
        right: 15px;
        left: auto;
    }
    
    .radio-player.minimized[data-position="top-left"] {
        top: 15px;
        bottom: auto;
        left: 15px;
        right: auto;
    }
    
    .radio-player.minimized .radio-station-logo {
        border-radius: 50%;
    }
    
    .radio-player.minimized .radio-station-logo img {
        border-radius: 50%;
    }
}

/* Animações */
.radio-player {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados de loading */
.radio-loading {
    position: relative;
}

.radio-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}