:root {
    --msap-primary: #e74c3c;
    --msap-live-bg: #ff0000;
    --msap-text: #ffffff;
    --msap-overlay-color: #000000;
}

@keyframes blink { 50% { opacity: 0.3; } }
@keyframes msap-glow {
    0% { box-shadow: 0 0 5px var(--msap-primary), 0 0 15px var(--msap-primary); }
    50% { box-shadow: 0 0 20px var(--msap-primary), 0 0 30px var(--msap-primary); }
    100% { box-shadow: 0 0 5px var(--msap-primary), 0 0 15px var(--msap-primary); }
}

/* Animación de texto Sintonizando */
@keyframes text-pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }
.msap-tuning-text { animation: text-pulse 1s infinite; font-style: italic; }

.msap-app-interface {
    position: relative;
    width: 100%; max-width: 1100px; height: 600px; margin: 30px auto;
    border-radius: 20px; overflow: hidden;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--msap-text) !important;
    background: #1a1a1a;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.msap-app-interface * { color: var(--msap-text); }

.msap-bg-layer {
    position: absolute; top: -10%; left: -10%; width: 120%; height: 120%;
    background-size: cover; background-position: center;
    filter: blur(40px) brightness(0.5); z-index: 0;
    transition: background-image 1s ease;
}

.msap-overlay-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), var(--msap-overlay-color));
    opacity: 0.85; z-index: 1; pointer-events: none;
}

.msap-content-container { position: relative; z-index: 10; display: flex; height: calc(100% - 80px); }

/* Panel Izquierdo */
.msap-main-panel {
    flex: 1.5; padding: 40px; 
    display: flex; flex-direction: column; justify-content: center; align-items: center; 
    position: relative;
}

.msap-live-badge-floating {
    position: absolute; top: 20px; right: 20px;
    background: var(--msap-live-bg);
    color: #ffffff !important;
    padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: bold;
    display: flex; align-items: center; gap: 6px;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.msap-dot { width: 8px; height: 8px; background: #ffffff; border-radius: 50%; animation: blink 1.5s infinite; }

.msap-cover-area {
    width: 280px; height: 280px;
    margin-bottom: 25px; border-radius: 12px; overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    background: rgba(255,255,255,0.05);
}
.msap-cover-area img { width: 100%; height: 100%; object-fit: cover; }

.msap-track-info { text-align: center; width: 100%; z-index: 20; }
#msap-current-city { font-size: 0.9rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 2px; margin: 0; font-weight: 400; }
#msap-current-station { font-size: 2rem; font-weight: 700; margin: 10px 0; text-shadow: 0 2px 10px rgba(0,0,0,0.5); line-height: 1.2; }
.msap-song-title { font-size: 1.1rem; color: var(--msap-primary) !important; margin-top: 5px; font-weight: 600; min-height: 1.5em; }

/* Panel Derecho */
.msap-side-panel {
    flex: 1; background: rgba(0,0,0,0.3);
    border-left: 1px solid rgba(255,255,255,0.1);
    padding: 30px; display: flex; flex-direction: column;
}
.msap-list-title { margin: 0 0 20px 0; font-size: 1.1rem; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; opacity: 0.9; }
.msap-station-list-scroll { flex-grow: 1; overflow-y: auto; padding-right: 5px; }
.msap-station-list-scroll::-webkit-scrollbar { width: 6px; }
.msap-station-list-scroll::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.msap-station-list-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 3px; }

.msap-list-item {
    display: flex; align-items: center; padding: 10px; margin-bottom: 8px;
    background: rgba(255,255,255,0.05); border-radius: 8px; cursor: pointer; transition: all 0.2s;
}
.msap-list-item:hover { background: rgba(255,255,255,0.15); transform: translateX(5px); }
.msap-list-item.active { background: rgba(255,255,255,0.20); border-left: 4px solid var(--msap-primary); }

.msap-item-icon {
    width: 42px; height: 42px; border-radius: 6px; overflow: hidden; margin-right: 15px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3);
}
.msap-item-icon img { width: 100%; height: 100%; object-fit: cover; }
.msap-item-icon .dashicons { font-size: 24px; color: #ccc; width: 24px; height: 24px; }

.msap-item-info { overflow: hidden; }
.msap-item-info strong { display: block; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msap-item-info small { display: block; opacity: 0.6; font-size: 0.8rem; margin-top: 2px; }

/* Barra Inferior */
.msap-control-bar {
    position: absolute; bottom: 0; left: 0; width: 100%; height: 80px;
    background: rgba(0,0,0,0.9); border-top: 1px solid rgba(255,255,255,0.1);
    z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 0 30px;
}
.msap-controls-left { display: flex; align-items: center; gap: 20px; }
.msap-controls-center { flex-grow: 1; }
.msap-controls-right { display: flex; align-items: center; gap: 10px; width: 160px; justify-content: flex-end; }

/* SVG VOLUMEN */
.msap-vol-icon {
    width: 24px; height: 24px; flex-shrink: 0; opacity: 0.9;
}

.msap-btn-play {
    background: #ffffff; 
    color: #000000 !important; 
    border: none; border-radius: 50%; width: 50px; height: 50px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; box-shadow: 0 0 10px rgba(255,255,255,0.1);
}
.msap-btn-play .dashicons { color: #000000 !important; font-size: 28px; width: 28px; height: 28px; }

.msap-btn-play:hover { transform: scale(1.05); }

.msap-btn-play.msap-playing-active {
    background: var(--msap-primary);
    animation: msap-glow 2s infinite ease-in-out;
}
.msap-btn-play.msap-playing-active .dashicons { color: #ffffff !important; }


.msap-timer-box { font-variant-numeric: tabular-nums; font-size: 0.9rem; }
#msap-status-text { opacity: 0.6; margin-left: 8px; font-size: 0.8rem; text-transform: uppercase; }

#msap-volume {
    width: 100px; height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px;
    -webkit-appearance: none; cursor: pointer;
}
#msap-volume::-webkit-slider-thumb {
    -webkit-appearance: none; width: 12px; height: 12px; background: var(--msap-primary); border-radius: 50%; box-shadow: 0 0 5px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    .msap-app-interface { height: auto; border-radius: 0; margin: 0; max-width: 100%; box-shadow: none; border: none; }
    .msap-content-container { flex-direction: column; height: auto; padding-bottom: 90px; }
    .msap-main-panel { padding: 40px 20px; flex: none; }
    .msap-cover-area { width: 200px; height: 200px; }
    #msap-current-station { font-size: 1.6rem; }
    .msap-side-panel { height: auto; min-height: 300px; border-left: none; border-top: 1px solid rgba(255,255,255,0.1); background: rgba(0,0,0,0.6); }
    .msap-control-bar { position: fixed; bottom: 0; background: rgba(0,0,0,0.95); }
}