/* ================== VARIABLES GLOBALES ================== */
.crp-player {
    --crp-background: #1a1a2e;
    --crp-accent: #e74c3c;
    --crp-text: #ffffff;
    --crp-radio-name-color: #FFD700;
}

/* ================== ESTILOS PRINCIPALES ================== */
.crp-player {
    position: relative;
    width: 100%;
    min-height: 400px;
    overflow: hidden;
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: transparent !important;
    margin: 0;
    padding: 0;
}

.crp-player * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================== FONDO ================== */
.crp-background {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.5s ease-in-out;
    filter: blur(30px) brightness(0.85);
    transform: scale(1);
    z-index: 0;
}

.crp-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.4) 100%);
    backdrop-filter: blur(5px);
    z-index: 1;
}

/* ================== CONTENEDOR PRINCIPAL ================== */
.crp-container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    height: 100%;
    min-height: 400px;
    padding: 40px;
    flex-wrap: wrap;
}

/* ================== CARÁTULA ================== */
.crp-cover-section {
    flex-shrink: 0;
}

.crp-cover-wrapper {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    animation: crp-float 3s ease-in-out infinite;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

@keyframes crp-float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.crp-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.crp-cover-wrapper:hover .crp-cover {
    transform: scale(1.05);
}

/* ================== NOMBRE DE LA RADIO ================== */
.crp-radio-name {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--crp-radio-name-color), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: crp-textGlow 2s ease-in-out infinite;
}

/* Animación de brillo para el nombre */
@keyframes crp-textGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(255,215,0,0.3);
        opacity: 1;
    }
    50% {
        text-shadow: 0 0 20px rgba(255,215,0,0.6);
        opacity: 0.95;
    }
}

/* ================== TEXTO DE CANCIÓN ================== */
.crp-song-title {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 30px;
    line-height: 1.4;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    min-height: 50px;
    color: var(--crp-text);
}

/* ================== CONTROLES ================== */
.crp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

/* ================== BOTÓN PLAY/PAUSA ================== */
.crp-play-btn {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    background-color: #e74c3c !important; /* ROJO por defecto */
    z-index: 10;
}

.crp-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.crp-play-btn:active {
    transform: scale(0.98);
}

/* Estado activo (reproduciendo) - VERDE CON PULSACIONES */
.crp-play-btn.playing {
    background-color: #2ecc71 !important;
    animation: crp-playPulse 0.8s ease-in-out infinite;
}

/* Animación de pulsación multicolor para el botón activo */
@keyframes crp-playPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
        transform: scale(1);
    }
    25% {
        box-shadow: 0 0 0 12px rgba(46, 204, 113, 0.3);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(52, 152, 219, 0.4);
        transform: scale(1.02);
    }
    75% {
        box-shadow: 0 0 0 12px rgba(241, 196, 15, 0.3);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
        transform: scale(1);
    }
}

.crp-play-btn svg {
    position: relative;
    z-index: 2;
    transition: transform 0.2s ease;
}

/* ================== CONTROL DE VOLUMEN ================== */
.crp-volume-control {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0px;
    background: transparent;
    padding: 8px 0px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

/* Solo el botón de volumen visible por defecto */
.crp-volume-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 42px;
    height: 42px;
}

.crp-volume-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

/* Contenedor del slider - OCULTO por defecto */
.crp-volume-slider-container {
    position: relative;
    width: 0;
    overflow: hidden;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
}

/* Al hacer hover sobre el botón, se despliega el slider */
.crp-volume-btn:hover + .crp-volume-slider-container,
.crp-volume-slider-container:hover {
    width: 130px;
    opacity: 1;
    visibility: visible;
    margin-left: 12px;
}

.crp-volume-slider {
    -webkit-appearance: none;
    width: 120px;
    height: 5px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    cursor: pointer;
}

.crp-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.crp-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    background: var(--crp-accent);
}

.crp-volume-level {
    position: absolute;
    left: 0;
    top: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--crp-accent), #f39c12);
    border-radius: 5px;
    pointer-events: none;
    transition: width 0.05s linear;
}

.crp-volume-value {
    font-size: 11px;
    color: white;
    opacity: 0;
    margin-left: 0;
    font-weight: 500;
    transition: opacity 0.2s ease;
    font-family: monospace;
    min-width: 35px;
}

.crp-volume-slider-container:hover + .crp-volume-value,
.crp-volume-btn:hover + .crp-volume-slider-container + .crp-volume-value {
    opacity: 0.9;
    margin-left: 8px;
}

/* ================== VISUALIZADOR ================== */
.crp-visualizer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    z-index: 3;
    pointer-events: none;
    opacity: 0.7;
}

@media (max-width: 480px) {
    .crp-visualizer {
        height: 80px;
    }
}

/* ================== BOTONES DE REDES SOCIALES ================== */
.crp-social-buttons {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 16px;
    z-index: 20;
    padding: 0 20px;
}

.crp-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo en hover */
.crp-social-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.crp-social-btn:hover {
    transform: translateY(-4px) scale(1.08);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.crp-social-btn:hover::before {
    opacity: 1;
}

.crp-social-btn:active {
    transform: translateY(0px) scale(0.95);
}

/* Colores específicos para cada red social (efecto sutil en hover) */
.crp-social-btn[aria-label="Síguenos en X"]:hover {
    background: rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.5);
}

.crp-social-btn[aria-label="Síguenos en Instagram"]:hover {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
}

.crp-social-btn[aria-label="Síguenos en Facebook"]:hover {
    background: #1877f2;
    border-color: transparent;
}

.crp-social-btn[aria-label="Contáctanos por WhatsApp"]:hover {
    background: #25d366;
    border-color: transparent;
}

/* ================== AJUSTE PARA EVITAR SUPERPOSICIÓN CON BOTONES SOCIALES ================== */
.crp-info-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
    padding: 10px 0;
}

.crp-radio-name {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
    letter-spacing: 2px;
    background: linear-gradient(135deg, var(--crp-radio-name-color), #fff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: crp-textGlow 2s ease-in-out infinite;
}

.crp-song-title {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 20px;
    line-height: 1.4;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
    min-height: 30px;
    color: var(--crp-text);
    text-align: center;
    padding: 0 10px;
}

.crp-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 5px;
}

/* ================== BOTONES DE REDES SOCIALES ================== */
.crp-social-buttons {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 16px;
    z-index: 20;
    padding: 0 20px;
}

/* Ajuste cuando hay visualizador activo */
.crp-player .crp-visualizer ~ .crp-social-buttons {
    bottom: 70px;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
    .crp-container {
        gap: 30px;
        padding: 30px 20px;
    }
    
    .crp-cover-wrapper {
        width: 180px;
        height: 180px;
    }
    
    .crp-radio-name {
        font-size: 24px;
        margin-bottom: 3px;
    }
    
    .crp-song-title {
        font-size: 16px;
        margin-bottom: 15px;
        min-height: 25px;
    }
    
    .crp-play-btn {
        width: 60px;
        height: 60px;
    }
    
    .crp-social-buttons {
        bottom: 16px;
        gap: 12px;
    }
    
    .crp-social-btn {
        width: 40px;
        height: 40px;
    }
    
    .crp-social-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .crp-player .crp-visualizer ~ .crp-social-buttons {
        bottom: 60px;
    }
}

@media (max-width: 480px) {
    .crp-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }
    
    .crp-cover-wrapper {
        width: 140px;
        height: 140px;
    }
    
    .crp-radio-name {
        font-size: 20px;
        margin-bottom: 2px;
    }
    
    .crp-song-title {
        font-size: 14px;
        margin-bottom: 12px;
        min-height: 20px;
    }
    
    .crp-play-btn {
        width: 55px;
        height: 55px;
    }
    
    .crp-social-buttons {
        bottom: 12px;
        gap: 10px;
        padding: 0 10px;
    }
    
    .crp-social-btn {
        width: 36px;
        height: 36px;
    }
    
    .crp-social-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .crp-volume-value {
        display: none;
    }
    
    .crp-visualizer {
        height: 60px;
    }
    
    .crp-player .crp-visualizer ~ .crp-social-buttons {
        bottom: 50px;
    }
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .crp-social-buttons {
        bottom: 16px;
        gap: 12px;
    }
    
    .crp-social-btn {
        width: 40px;
        height: 40px;
    }
    
    .crp-social-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .crp-social-buttons {
        bottom: 12px;
        gap: 10px;
        padding: 0 10px;
    }
    
    .crp-social-btn {
        width: 36px;
        height: 36px;
    }
    
    .crp-social-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Ajuste para que no se superponga con el visualizador */
.crp-player .crp-visualizer ~ .crp-social-buttons {
    bottom: 70px;
}

@media (max-width: 768px) {
    .crp-player .crp-visualizer ~ .crp-social-buttons {
        bottom: 60px;
    }
}

@media (max-width: 480px) {
    .crp-player .crp-visualizer ~ .crp-social-buttons {
        bottom: 50px;
    }
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
    .crp-container {
        gap: 30px;
        padding: 30px;
    }
    
    .crp-cover-wrapper {
        width: 180px;
        height: 180px;
    }
    
    .crp-radio-name {
        font-size: 24px;
    }
    
    .crp-song-title {
        font-size: 16px;
    }
    
    .crp-play-btn {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .crp-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }
    
    .crp-cover-wrapper {
        width: 150px;
        height: 150px;
    }
    
    .crp-radio-name {
        font-size: 20px;
    }
    
    .crp-song-title {
        font-size: 14px;
    }
    
    .crp-play-btn {
        width: 55px;
        height: 55px;
    }
    
    .crp-volume-value {
        display: none;
    }
    
    .crp-visualizer {
        height: 60px;
    }
}