/* ===== REPRODUCTOR FLOTANTE GLOBAL ===== */
:root {
    --azul-profundo: #0a0e27;
    --azul-neon: #00d4ff;
    --azul-claro: #1a3a5c;
    --dorado: #ffd700;
    --dorado-neon: #ffed4e;
    --blanco: #ffffff;
    --negro: #000000;
    --morado-neon: #b347ff;
    --rosa-neon: #ff0080;
}

.global-floating-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border: 2px solid var(--azul-neon);
    border-radius: 15px;
    padding: 0;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.4);
    z-index: 9999;
    transform: translateY(150%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    display: none;
    overflow: hidden;
    position: relative;
    cursor: move;
    user-select: none;
}

.global-floating-player.dragging {
    transition: none;
    cursor: grabbing;
}

.global-floating-player::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 15px;
    background: linear-gradient(45deg, 
        var(--azul-neon), 
        var(--morado-neon), 
        var(--dorado), 
        var(--rosa-neon),
        var(--azul-neon));
    background-size: 400% 400%;
    z-index: -1;
    opacity: 0;
    animation: borderGlow 3s linear infinite;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 2px;
}

.global-floating-player.active::before {
    opacity: 1;
}

@keyframes borderGlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.global-floating-player.active {
    transform: translateY(0);
    display: block;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(0, 212, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 40px rgba(0, 212, 255, 0.7), 0 0 20px rgba(0, 212, 255, 0.5);
    }
}

.global-floating-player.minimized {
    bottom: 0;
    right: 0;
    left: 0;
    top: auto;
    min-width: 100%;
    max-width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-top: 2px solid var(--azul-neon);
    padding: 0.5rem 1rem;
    z-index: 9998;
}

.global-floating-player.minimized::before {
    border-radius: 0;
    top: -2px;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        var(--azul-neon), 
        var(--morado-neon), 
        var(--dorado), 
        var(--rosa-neon),
        var(--azul-neon));
    background-size: 400% 100%;
    animation: borderGlowHorizontal 3s linear infinite;
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 2px;
}

@keyframes borderGlowHorizontal {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 0%;
    }
}

.global-player-header {
    display: flex;
    justify-content: flex-end;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    cursor: move;
}

.global-floating-player.minimized .global-player-header {
    cursor: default;
}

.global-player-minimize,
.global-player-expand {
    background: transparent;
    border: 1px solid var(--azul-neon);
    color: var(--azul-neon);
    width: 30px;
    height: 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.global-player-minimize:hover,
.global-player-expand:hover {
    background: var(--azul-neon);
    color: var(--azul-profundo);
}

.global-player-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
}

.global-player-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.global-player-cover {
    font-size: 2.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 212, 255, 0.2);
    border-radius: 10px;
    border: 2px solid var(--azul-neon);
}

.global-player-details {
    flex: 1;
    min-width: 0;
}

.global-player-name {
    font-weight: bold;
    color: var(--azul-neon);
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-player-genre {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.global-player-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.global-player-volume-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.volume-btn {
    min-width: 40px;
    padding: 0.5rem;
}

.global-volume-slider {
    flex: 1;
    height: 5px;
    background: rgba(26, 58, 92, 0.5);
    border-radius: 5px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.global-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: var(--azul-neon);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px var(--azul-neon);
}

.global-volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: var(--azul-neon);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 5px var(--azul-neon);
}

.global-volume-value {
    min-width: 45px;
    text-align: right;
    font-size: 0.85rem;
    color: var(--azul-neon);
}

.global-player-stations {
    margin-top: 0.5rem;
}

.global-station-selector {
    width: 100%;
    padding: 0.6rem;
    background: rgba(26, 58, 92, 0.5);
    border: 1px solid var(--azul-neon);
    border-radius: 8px;
    color: var(--blanco);
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.global-station-selector:hover {
    border-color: var(--dorado);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.global-station-selector:focus {
    border-color: var(--dorado);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.global-station-selector option {
    background: var(--azul-profundo);
    color: var(--blanco);
    padding: 0.5rem;
}

.global-player-btn {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--azul-neon);
    color: var(--azul-neon);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    text-decoration: none;
}

.global-player-btn:hover {
    background: var(--azul-neon);
    color: var(--azul-profundo);
    box-shadow: 0 0 15px var(--azul-neon);
}

.global-chat-badge {
    background: var(--rosa-neon);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* Chat flotante global */
.global-chat-widget {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(10px);
    border: 2px solid var(--azul-neon);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.4);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

/* Ajustar posición del chat cuando el reproductor está minimizado */
.global-floating-player.minimized ~ .global-chat-widget {
    bottom: 80px;
}

.global-chat-widget.active {
    transform: translateX(0);
}

.global-chat-header {
    padding: 1rem;
    border-bottom: 2px solid var(--azul-neon);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 212, 255, 0.1);
}

.global-chat-header span {
    font-weight: bold;
    color: var(--azul-neon);
}

.global-chat-close {
    background: transparent;
    border: none;
    color: var(--azul-neon);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.global-chat-close:hover {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
}

.global-chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.global-chat-message {
    padding: 0.8rem;
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
}

.global-chat-message.user {
    background: rgba(0, 212, 255, 0.2);
    align-self: flex-end;
    border: 1px solid var(--azul-neon);
}

.global-chat-message.locutor {
    background: rgba(179, 71, 255, 0.2);
    align-self: flex-start;
    border: 1px solid var(--morado-neon);
}

.global-chat-author {
    font-weight: bold;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: var(--azul-neon);
}

.global-chat-text {
    font-size: 0.9rem;
    line-height: 1.4;
}

.global-chat-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.3rem;
}

.global-chat-input-container {
    padding: 1rem;
    border-top: 2px solid var(--azul-neon);
    display: flex;
    gap: 0.5rem;
}

.global-chat-input {
    flex: 1;
    padding: 0.8rem;
    background: rgba(26, 58, 92, 0.5);
    border: 1px solid var(--azul-neon);
    border-radius: 20px;
    color: var(--blanco);
    outline: none;
}

.global-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.global-chat-send {
    padding: 0.8rem 1.5rem;
    background: var(--azul-neon);
    border: none;
    border-radius: 20px;
    color: var(--azul-profundo);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.global-chat-send:hover {
    background: var(--dorado);
    box-shadow: 0 0 15px var(--dorado);
}

@media (max-width: 768px) {
    .global-floating-player {
        bottom: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }

    .global-floating-player.minimized {
        min-width: 150px;
        max-width: 150px;
    }

    .global-player-controls {
        gap: 0.3rem;
    }

    .global-player-btn {
        padding: 0.5rem 0.8rem;
        font-size: 1rem;
    }

    .global-chat-widget {
        bottom: 100px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 400px;
    }
}
