/* ── MUSIC PLAYER ── */
#mp-widget {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 9985;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    user-select: none;
    font-family: 'Share Tech Mono', monospace;
}

/* ── station panel ── */
#mp-panel {
    width: 300px;
    background: #000;
    border: 1px solid #00ff41;
    border-bottom: none;
    box-shadow: 0 0 25px rgba(0,255,65,.12), 0 0 60px rgba(0,255,65,.04);
    transform-origin: bottom left;
    transform: scaleY(0) scaleX(.96);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
    overflow: hidden;
    position: relative;
}
#mp-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg, transparent 0, transparent 2px,
        rgba(0,0,0,.15) 2px, rgba(0,0,0,.15) 4px
    );
    pointer-events: none;
    z-index: 1;
}
#mp-panel.open {
    transform: scaleY(1) scaleX(1);
    opacity: 1;
    pointer-events: auto;
}

.mp-panel-hd {
    background: #050505;
    border-bottom: 1px solid #0e2a0e;
    padding: 7px 12px;
    font-size: .67rem;
    color: #00ff41;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}
.mp-panel-close {
    cursor: pointer;
    color: #778877;
    padding: 0 3px;
    transition: color .2s;
}
.mp-panel-close:hover { color: #ff00ff; text-shadow: 0 0 8px #ff00ff; }

.mp-station-row {
    display: flex;
    align-items: center;
    padding: 9px 12px;
    border-bottom: 1px solid #0a1a0a;
    cursor: pointer;
    transition: background .12s;
    gap: 10px;
    position: relative;
    z-index: 2;
}
.mp-station-row:last-child { border-bottom: none; }
.mp-station-row:hover { background: rgba(0,255,65,.05); }
.mp-station-row.active { background: rgba(0,255,65,.07); }

.mp-s-indicator {
    font-size: .68rem;
    color: #1a4a1a;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    transition: color .15s;
}
.mp-station-row.active .mp-s-indicator { color: #00ff41; }
.mp-station-row:hover:not(.active) .mp-s-indicator { color: #3a7a3a; }

.mp-s-info { flex: 1; min-width: 0; }
.mp-s-name {
    display: block;
    font-size: .72rem;
    color: #4a8a4a;
    letter-spacing: .04em;
    transition: color .15s;
}
.mp-s-desc { font-size: .6rem; color: #2a4a2a; }
.mp-station-row.active .mp-s-name { color: #00ff41; }
.mp-station-row:hover:not(.active) .mp-s-name { color: #6ab46a; }

.mp-s-freq {
    font-size: .6rem;
    color: #1a3a1a;
    flex-shrink: 0;
}
.mp-station-row.active .mp-s-freq { color: #00aa29; }

/* ── bar ── */
#mp-bar {
    width: 300px;
    height: 44px;
    background: #000;
    border: 1px solid #00ff41;
    border-top-color: #1a3a1a;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    box-shadow: 0 0 0 1px #002200, 0 0 20px rgba(0,255,65,.08);
}

#mp-play-btn {
    background: transparent;
    border: 1px solid #2a5a2a;
    color: #4a8a4a;
    font-family: 'Share Tech Mono', monospace;
    font-size: .68rem;
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
    flex-shrink: 0;
    line-height: 1;
}
#mp-play-btn:hover {
    border-color: #00ff41;
    color: #00ff41;
    box-shadow: 0 0 8px rgba(0,255,65,.2);
}
#mp-play-btn.live {
    border-color: #00ff41;
    color: #00ff41;
}

#mp-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}
.mp-cur-name {
    display: block;
    font-size: .64rem;
    color: #00ff41;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: .04em;
}
.mp-cur-status {
    display: block;
    font-size: .57rem;
    color: #2a5a2a;
    letter-spacing: .02em;
}

/* ── visualizer ── */
#mp-viz {
    width: 54px;
    height: 22px;
    flex-shrink: 0;
    image-rendering: pixelated;
}

/* ── volume ── */
.mp-vol {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.mp-vol-lbl {
    font-size: .54rem;
    color: #2a5a2a;
    letter-spacing: .06em;
}
#mp-volume {
    width: 42px;
    height: 3px;
    -webkit-appearance: none;
    appearance: none;
    background: #1a3a1a;
    border-radius: 999px;
    outline: none;
    cursor: pointer;
}
#mp-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00ff41;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0,255,65,.5);
}
#mp-volume::-moz-range-thumb {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00ff41;
    border: none;
    cursor: pointer;
}

/* ── mobile ── */
@media (max-width: 520px) {
    #mp-bar, #mp-panel { width: calc(100vw - 158px); min-width: 150px; }
    .mp-s-freq { display: none; }
}

/* ── live dot ── */
@keyframes mp-pulse { 50% { opacity: .3; } }
.mp-live-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #00ff41;
    box-shadow: 0 0 4px #00ff41;
    animation: mp-pulse .9s step-end infinite;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}
.mp-live-dot.off { opacity: 0; animation: none; }
