/* Radio Station Manager - Frontend Styles */

.rsm-player-container {
    position: relative;
    width: 100%;
    min-height: 600px;
    overflow: hidden;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Fondo con efecto blur */
.rsm-background-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#rsm-bg-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(20px);
    transform: scale(1.1);
    transition: background-image 1s ease;
}

.rsm-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.85) 100%);
}

/* Contenedor principal */
.rsm-content-wrapper {
    position: relative;
    z-index: 2;
    padding: 40px 20px;
    color: #fff;
}

/* Sección de Programa Actual */
.rsm-current-program-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rsm-program-badge {
    display: inline-block;
    background: #ff4444;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.rsm-program-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.rsm-program-image {
    width: 120px;
    height: 120px;
    border-radius: 15px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.rsm-program-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
}

.rsm-no-program {
    font-size: 18px;
    opacity: 0.8;
}

/* Sección del Reproductor */
.rsm-player-section {
    margin-bottom: 40px;
}

.rsm-song-info {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.rsm-cover-art {
    width: 200px;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><rect fill="%23333" width="200" height="200"/><text x="50%" y="50%" text-anchor="middle" fill="%23fff" font-size="20" dy=".3em">🎵</text></svg>') no-repeat center;
    background-size: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.2);
    transition: background-image 1s ease;
    animation: fadeIn 1s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.rsm-song-details {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.rsm-song-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    animation: slideInRight 0.8s;
}

.rsm-artist-name {
    font-size: 20px;
    font-weight: 400;
    margin: 0;
    opacity: 0.9;
    animation: slideInRight 0.8s;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Controles */
.rsm-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.rsm-play-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    color: #000;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.3);
}

.rsm-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.4);
}

.rsm-play-btn:active {
    transform: scale(0.98);
}

.rsm-play-icon,
.rsm-pause-icon {
    font-size: 20px;
}

/* Control de Volumen */
.rsm-volume-control {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rsm-volume-icon {
    font-size: 24px;
}

#rsm-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 150px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    outline: none;
}

#rsm-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#rsm-volume::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

#rsm-volume-indicator {
    font-size: 14px;
    font-weight: 600;
    min-width: 40px;
}

/* Historial de Canciones */
.rsm-history-section {
    margin-top: 40px;
}

.rsm-history-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.rsm-history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.rsm-history-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    animation: slideInUp 0.6s;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.rsm-history-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

.rsm-history-cover {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.rsm-history-info {
    flex: 1;
    min-width: 0;
}

.rsm-history-song {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rsm-history-artist {
    font-size: 14px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Widget Simple */
.rsm-widget-program {
    text-align: center;
    padding: 20px;
}

.rsm-widget-program img {
    max-width: 200px;
    border-radius: 10px;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .rsm-content-wrapper {
        padding: 20px 10px;
    }

    .rsm-song-info {
        flex-direction: column;
    }

    .rsm-cover-art {
        width: 150px;
        height: 150px;
    }

    .rsm-song-title {
        font-size: 24px;
    }

    .rsm-artist-name {
        font-size: 16px;
    }

    .rsm-program-title {
        font-size: 18px;
    }

    .rsm-history-grid {
        grid-template-columns: 1fr;
    }
}