/* ══════════════════════════════════════════════════════════════
   BOTTOM BAR PLAYER — floating-player.css
   ══════════════════════════════════════════════════════════════ */

body.has-player-bar { padding-bottom: 72px; }

#player-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000; }

#player-bar.pb-public .pb-bar   { display: flex; }
#player-bar.pb-public .pb-pip   { display: none; }
#player-bar.pb-staff  .pb-bar   { display: none; }
#player-bar.pb-staff  .pb-pip   { display: flex; }
#player-bar.pb-staff  .pe-panel { display: none !important; }

/* ── Expanded panel ── */
.pe-panel {
    position: absolute; bottom: 100%; left: 0; right: 0;
    background: rgba(0,5,15,0.98);
    border-top: 1px solid rgba(0,255,255,0.25);
    border-left: 1px solid rgba(0,255,255,0.1);
    border-right: 1px solid rgba(0,255,255,0.1);
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1);
    backdrop-filter: blur(16px);
}
.pe-panel.is-open { max-height: 72vh; }

.pe-grip {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border: none; background: transparent;
    color: var(--color-muted); cursor: pointer;
    font-family: 'Courier New', monospace; font-size: 0.65rem; letter-spacing: 0.08em;
    width: 100%; border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
}
.pe-grip:hover { color: var(--color-accent); }

.pe-content {
    display: grid; grid-template-columns: 200px 1fr 1fr;
    gap: 1.25rem; padding: 1rem 1.25rem 1rem;
    height: calc(72vh - 42px); overflow: hidden;
    transition: grid-template-columns 0.3s ease;
}
.pe-content:has(.pe-lyrics-col.no-lyrics) {
    grid-template-columns: 200px 180px 1fr;
}
.pe-art-col { display: flex; flex-direction: column; gap: 0.6rem; overflow: hidden; }
.pe-art {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: 4px; border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0; max-height: 180px;
}
.pe-title  { font-size: 0.95rem; font-weight: 600; color: #e0e0e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-artist { font-size: 0.78rem; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-progress { margin-top: 0.25rem; }
.pe-time {
    display: flex; justify-content: space-between;
    font-family: 'Courier New', monospace; font-size: 0.68rem;
    color: rgba(255,255,255,0.4); margin-top: 0.3rem;
}

/* ── Shared column label ── */
.pe-col-label {
    display: block; font-family: 'Courier New', monospace; font-size: 0.65rem;
    color: var(--color-accent); letter-spacing: 0.1em;
    margin-bottom: 0.5rem; flex-shrink: 0;
}

/* ── Lyrics column ── */
.pe-lyrics-col {
    display: flex; flex-direction: column; overflow: hidden;
    border-left: 1px solid rgba(255,255,255,0.06);
    padding-left: 1rem;
}
.pe-lyrics-scroll {
    flex: 1; overflow-y: auto; position: relative;
    scrollbar-width: none;
    mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 8%, black 85%, transparent 100%);
}
.pe-lyrics-scroll::-webkit-scrollbar { display: none; }
.pe-lyrics-text {
    font-family: 'Courier New', monospace; font-size: 0.82rem;
    line-height: 1.85; color: rgba(255,255,255,0.55);
    white-space: pre-wrap; margin: 0; padding: 1rem 0.25rem 4rem;
}
.pe-lyrics-empty {
    font-family: 'Courier New', monospace; font-size: 0.75rem;
    color: rgba(255,255,255,0.2); padding: 1rem 0.25rem;
    display: none;
}

/* ── Right hub column ── */
.pe-hub-col {
    display: flex; flex-direction: column; gap: 0.75rem; overflow: hidden;
    border-left: 1px solid rgba(255,255,255,0.06);
    padding-left: 1rem;
}
.pe-viz-col {
    flex: 0 0 45%; position: relative; overflow: hidden;
    border-radius: 4px; border: 1px solid rgba(0,255,255,0.1);
    min-height: 0;
}

/* ── Artist songs ── */
.pe-artist-songs {
    flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}
.pe-artist-songs-list {
    flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.4rem;
    scrollbar-width: thin; scrollbar-color: rgba(0,255,255,0.2) transparent;
}
.pe-artist-song-item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.35rem 0.5rem; border-radius: 3px;
    border: 1px solid transparent; transition: border-color 0.15s, background 0.15s;
    cursor: default;
}
.pe-artist-song-item:hover { border-color: rgba(0,255,255,0.15); background: rgba(0,255,255,0.03); }
.pe-artist-song-art {
    width: 32px; height: 32px; border-radius: 2px; object-fit: cover;
    border: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
}
.pe-artist-song-meta { min-width: 0; flex: 1; }
.pe-artist-song-title  { display: block; font-size: 0.92rem; color: #d0d0d0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pe-artist-song-plays  { display: block; font-family: 'Courier New', monospace; font-size: 0.72rem; color: rgba(255,255,255,0.3); }
.pe-songs-empty { font-family: 'Courier New', monospace; font-size: 0.75rem; color: rgba(255,255,255,0.2); padding: 0.5rem 0; }
#fp-visualizer { width: 100%; height: 100%; }
#fp-visualizer canvas { width: 100% !important; height: 100% !important; }

/* ── Bottom bar ── */
.pb-bar {
    height: 72px; display: flex; align-items: center; gap: 0.85rem;
    padding: 0 1.25rem; background: rgba(0,5,15,0.97);
    border-top: 1px solid rgba(0,255,255,0.2); backdrop-filter: blur(16px);
}
.pb-art  { width: 48px; height: 48px; border-radius: 3px; object-fit: cover; border: 1px solid rgba(255,255,255,0.1); flex-shrink: 0; }
.pb-meta { display: flex; flex-direction: column; min-width: 0; flex: 0 0 220px; gap: 0.15rem; }
.pb-title  { font-size: 0.95rem; font-weight: 600; color: #e0e0e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-artist { font-size: 0.78rem; color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-progress-wrap { flex: 1; min-width: 80px; padding: 0 0.25rem; }
.pb-live-info {
    display: flex; align-items: center; gap: 0.35rem; flex-shrink: 0;
    font-family: 'Courier New', monospace; font-size: 0.7rem;
    color: rgba(255,255,255,0.4); white-space: nowrap;
}
.pb-live-dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
    background: rgba(255,255,255,0.2);
}
.pb-live-info.is-live .pb-live-dot {
    background: #00ff80; box-shadow: 0 0 6px #00ff80;
    animation: pip-live-pulse 1.5s ease-in-out infinite;
}
.pb-live-info.is-live .pb-dj-name { color: var(--color-accent); }
.pb-listener-icon { font-size: 0.65rem; opacity: 0.5; }
.pb-controls { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

.pb-like, .music-toggle-bar {
    font-size: 1.35rem; color: var(--color-muted); cursor: pointer; transition: color 0.15s;
}
.pb-like:hover         { color: var(--color-primary); }
.music-toggle-bar:hover { color: var(--color-accent); }
.pb-like.fa-solid       { color: var(--color-primary); }

.pb-panel-btn, .pb-expand-btn {
    background: none; border: 1px solid rgba(0,255,255,0.2); border-radius: 3px;
    color: var(--color-muted); cursor: pointer; padding: 0.45rem 0.7rem;
    font-size: 1rem; line-height: 1; transition: color 0.15s, border-color 0.15s;
}
.pb-panel-btn:hover, .pb-expand-btn:hover { color: var(--color-accent); border-color: rgba(0,255,255,0.5); }
.pb-panel-btn.is-open { color: var(--color-accent); border-color: rgba(0,255,255,0.5); }
.pb-expand-btn.is-expanded i { transform: rotate(180deg); }

.progress-container {
    width: 100%; height: 3px; background: rgba(255,255,255,0.12); border-radius: 2px; overflow: hidden;
}
.progress-bar {
    height: 100%; background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    border-radius: 2px; transition: width 0.5s linear; width: 0;
}

.fp-mute-btn {
    font-size: 1.15rem; color: var(--color-muted); cursor: pointer;
    transition: color 0.15s;
}
.fp-mute-btn:hover    { color: var(--color-accent); }
.fp-mute-btn.is-muted { color: rgba(255,255,255,0.25); }

.fp-vol-wrap {
    position: relative; display: flex; align-items: center; gap: 0.55rem; flex-shrink: 0;
}
.fp-vol-popup {
    display: flex; align-items: center;
}
.fp-vol-slider {
    width: 76px; cursor: pointer; outline: none;
    -webkit-appearance: none; appearance: none;
    background: transparent;
}
.fp-vol-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 7px var(--color-accent);
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.fp-vol-slider::-webkit-slider-thumb:hover {
    transform: scale(1.25);
    box-shadow: 0 0 12px var(--color-accent), 0 0 20px rgba(0,255,255,0.35);
}
.fp-vol-slider::-moz-range-thumb {
    width: 12px; height: 12px; border-radius: 50%; border: none;
    background: var(--color-accent);
    box-shadow: 0 0 7px var(--color-accent); cursor: pointer;
}
.fp-vol-slider::-webkit-slider-runnable-track {
    height: 3px; border-radius: 2px;
    background: rgba(255,255,255,0.15);
}
.fp-vol-slider::-moz-range-track {
    height: 3px; border-radius: 2px; background: rgba(255,255,255,0.12);
}
.fp-vol-slider::-moz-range-progress {
    height: 3px; border-radius: 2px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
}

@media (max-width: 640px) {
    .fp-vol-popup {
        position: absolute; bottom: calc(100% + 8px); right: 0;
        background: rgba(0,5,15,0.97); border: 1px solid rgba(0,255,255,0.2);
        border-radius: 3px; padding: 0.6rem 0.5rem;
        display: flex; align-items: center; justify-content: center;
        height: 96px;
        opacity: 0; pointer-events: none;
        transition: opacity 0.15s; z-index: 10;
    }
    .fp-vol-wrap.is-open .fp-vol-popup { opacity: 1; pointer-events: auto; }
    .fp-vol-slider {
        writing-mode: vertical-lr; direction: rtl;
        -webkit-appearance: slider-vertical; appearance: auto;
        width: 4px; height: 80px;
    }
}

/* ── Pip ── */
.pb-pip {
    position: fixed; bottom: 1rem; right: 1rem; z-index: 9000;
    width: 50px; height: 50px; border-radius: 50%;
    background: rgba(0,5,15,0.95); border: 1px solid rgba(0,255,255,0.35);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 0 14px rgba(0,255,255,0.12); transition: box-shadow 0.2s, border-color 0.2s;
}
.pb-pip:hover { box-shadow: 0 0 22px rgba(0,255,255,0.28); border-color: rgba(0,255,255,0.6); }
.music-toggle-pip { font-size: 1.3rem; color: var(--color-accent); pointer-events: none; }
.pb-pip-live {
    position: absolute; top: 6px; right: 6px; width: 8px; height: 8px;
    border-radius: 50%; background: #00ff80;
    animation: pip-live-pulse 1.5s ease-in-out infinite;
}
@keyframes pip-live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 4px #00ff80; }
    50%       { opacity: 0.5; box-shadow: 0 0 2px #00ff80; }
}
.pb-pip-tip {
    position: absolute; bottom: calc(100% + 8px); right: 0;
    background: rgba(0,5,15,0.97); border: 1px solid rgba(0,255,255,0.2);
    padding: 0.3rem 0.6rem; border-radius: 3px; white-space: nowrap;
    font-family: 'Courier New', monospace; font-size: 0.7rem; color: #e0e0e0;
    opacity: 0; pointer-events: none; transition: opacity 0.15s;
    max-width: 220px; overflow: hidden; text-overflow: ellipsis;
}
.pb-pip:hover .pb-pip-tip { opacity: 1; }

/* ── Interaction panel ── */
.ip-panel {
    position: fixed; right: 0; top: 0; bottom: 72px; width: 340px;
    background: rgba(0,5,15,0.98); border-left: 1px solid rgba(0,255,255,0.2);
    z-index: 8990; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto; backdrop-filter: blur(16px);
}
.ip-panel.ip-staff { bottom: 0; }
.ip-panel.is-open  { transform: translateX(0); }

.ip-backdrop { display: none; position: fixed; inset: 0; bottom: 72px; z-index: 8980; background: rgba(0,0,0,0.4); }
.ip-backdrop.is-open { display: block; }

.ip-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.85rem 1rem; border-bottom: 1px solid rgba(0,255,255,0.1);
    background: rgba(0,5,15,0.95); position: sticky; top: 0; z-index: 1; flex-shrink: 0;
}
.ip-title { font-family: 'Courier New', monospace; font-size: 0.72rem; color: var(--color-accent); letter-spacing: 0.1em; }
.ip-close { background: none; border: none; color: var(--color-muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0.15rem; transition: color 0.15s; }
.ip-close:hover { color: #e0e0e0; }

.ip-offline-notice {
    display: flex; gap: 0.6rem; align-items: center;
    margin: 0.75rem; padding: 0.6rem 0.75rem;
    border: 1px solid rgba(251,70,228,0.3); border-radius: 3px;
    background: rgba(251,70,228,0.05);
    font-family: 'Courier New', monospace; font-size: 0.72rem; color: var(--color-muted);
}
.ip-offline-notice i { color: var(--color-primary); flex-shrink: 0; }

.ip-section { padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ip-section:last-child { border-bottom: none; }
.ip-section-label { display: block; font-family: 'Courier New', monospace; font-size: 0.68rem; color: var(--color-accent); letter-spacing: 0.1em; margin-bottom: 0.75rem; }
.ip-form { display: flex; flex-direction: column; gap: 0.5rem; }

.ip-input {
    width: 100%; box-sizing: border-box; background: #0a0015;
    border: 1px solid rgba(0,255,255,0.2); color: #e0e0e0;
    padding: 0.45rem 0.65rem; font-family: 'Courier New', monospace; font-size: 0.85rem;
    border-radius: 3px; outline: none; color-scheme: dark; transition: border-color 0.15s;
}
.ip-input:focus    { border-color: var(--color-accent); }
.ip-input:disabled { opacity: 0.4; cursor: not-allowed; }

.ip-msg { font-family: 'Courier New', monospace; font-size: 0.78rem; padding: 0.25rem 0; }
.ip-msg.success { color: #00ff80; }
.ip-msg.error   { color: #ff4444; }

.ip-poll-question { font-size: 0.9rem; color: #e0e0e0; margin-bottom: 0.75rem; line-height: 1.4; }
.ip-vote-btn {
    width: 100%; text-align: left; background: rgba(0,255,255,0.04);
    border: 1px solid rgba(0,255,255,0.15); color: #c0c0c0;
    padding: 0.5rem 0.75rem; margin-bottom: 0.4rem; border-radius: 3px;
    cursor: pointer; font-size: 0.85rem; font-family: 'Courier New', monospace;
    transition: border-color 0.15s, color 0.15s;
}
.ip-vote-btn:hover:not(:disabled) { border-color: var(--color-accent); color: #e0e0e0; }
.ip-vote-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.ip-vote-result { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.ip-vote-label { flex: 0 0 110px; font-size: 0.78rem; color: #c0c0c0; font-family: 'Courier New', monospace; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-vote-bar-wrap { flex: 1; height: 16px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.ip-vote-bar-fill { height: 100%; background: var(--color-accent); transition: width 0.4s ease; min-width: 2px; }
.ip-vote-pct { flex: 0 0 36px; text-align: right; font-family: 'Courier New', monospace; font-size: 0.7rem; color: var(--color-muted); }
.ip-poll-total { font-family: 'Courier New', monospace; font-size: 0.68rem; color: rgba(255,255,255,0.3); margin-top: 0.5rem; }

/* ── Mobile ── */
@media (max-width: 900px) {
    .pe-content { grid-template-columns: 200px 1fr; }
    .pe-hub-col  { display: none; }
}
@media (max-width: 640px) {
    .pb-art { display: none; }
    .pb-meta { flex: 1; flex-basis: auto; }
    .pb-progress-wrap, .pb-live-info { display: none; }
    .pe-content { grid-template-columns: 1fr; padding: 1rem; }
    .pe-art-col { flex-direction: row; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
    .pe-art { width: 64px; height: 64px; aspect-ratio: auto; max-height: unset; }
    .pe-lyrics-col { border-left: none; padding-left: 0; border-top: 1px solid rgba(255,255,255,0.06); padding-top: 0.75rem; }
    .ip-panel { width: 100%; }
}
