/* ===== Bunker Klub Radio Player ===== */
:root {
    --bkr-bg: #0a0a0a;
    --bkr-surface: #111111;
    --bkr-border: #222222;
    --bkr-text: #e0e0e0;
    --bkr-muted: #666666;
    --bkr-accent: #ff6600; /* overridden inline per instance */
    --bkr-radius: 12px;
    --bkr-font: 'Courier New', 'Lucida Console', monospace;
}

/* Container */
.bkr-player {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: var(--bkr-bg);
    border: 1px solid var(--bkr-border);
    border-top: 3px solid var(--bkr-accent);
    border-radius: var(--bkr-radius);
    padding: 20px 22px 18px;
    font-family: var(--bkr-font);
    color: var(--bkr-text);
    max-width: 500px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0,0,0,0.6);
    transition: border-color 0.3s;
}

/* ── Visualizer ── */
.bkr-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 32px;
    opacity: 0.18;
    transition: opacity 0.4s;
}
.bkr-player.bkr-playing .bkr-visualizer {
    opacity: 1;
}
.bkr-bar {
    display: block;
    flex: 1;
    background: var(--bkr-accent);
    border-radius: 2px 2px 0 0;
    height: 4px;
    transform-origin: bottom;
    transition: height 0.1s;
}
.bkr-player.bkr-playing .bkr-bar {
    animation: bkr-bounce 0.8s ease-in-out infinite alternate;
}
.bkr-bar:nth-child(odd)  { animation-delay: 0ms; }
.bkr-bar:nth-child(2)    { animation-delay: 80ms; }
.bkr-bar:nth-child(4)    { animation-delay: 160ms; }
.bkr-bar:nth-child(6)    { animation-delay: 240ms; }
.bkr-bar:nth-child(8)    { animation-delay: 60ms; }
.bkr-bar:nth-child(10)   { animation-delay: 200ms; }
.bkr-bar:nth-child(12)   { animation-delay: 120ms; }
.bkr-bar:nth-child(14)   { animation-delay: 300ms; }
.bkr-bar:nth-child(16)   { animation-delay: 40ms; }
.bkr-bar:nth-child(18)   { animation-delay: 180ms; }
.bkr-bar:nth-child(20)   { animation-delay: 100ms; }

@keyframes bkr-bounce {
    0%   { height: 4px; }
    100% { height: 28px; }
}

/* ── Info row ── */
.bkr-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bkr-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.bkr-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.bkr-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.12em;
    color: var(--bkr-accent);
    text-transform: uppercase;
}

.bkr-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--bkr-accent);
    animation: bkr-pulse 1.4s ease-in-out infinite;
}
.bkr-player:not(.bkr-playing) .bkr-dot {
    animation: none;
    background: var(--bkr-muted);
}
.bkr-player:not(.bkr-playing) .bkr-live-badge {
    color: var(--bkr-muted);
}

@keyframes bkr-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.85); }
}

.bkr-station-name {
    font-size: 15px;
    font-weight: bold;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.03em;
}

.bkr-now-playing {
    font-size: 11px;
    color: var(--bkr-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-style: italic;
}

/* ── Controls row ── */
.bkr-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bkr-btn-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--bkr-accent);
    color: #000;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.1s;
}
.bkr-btn-play:hover  { filter: brightness(1.15); }
.bkr-btn-play:active { transform: scale(0.93); }
.bkr-btn-play svg { width: 26px; height: 26px; }

.bkr-btn-mute {
    background: none;
    border: none;
    color: var(--bkr-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}
.bkr-btn-mute:hover { color: var(--bkr-text); }
.bkr-btn-mute svg { width: 20px; height: 20px; }

.bkr-volume-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

/* Volume slider */
.bkr-volume {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--bkr-border);
    outline: none;
    cursor: pointer;
}
.bkr-volume::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bkr-accent);
    cursor: pointer;
    transition: transform 0.1s;
}
.bkr-volume::-webkit-slider-thumb:hover { transform: scale(1.3); }
.bkr-volume::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--bkr-accent);
    border: none;
    cursor: pointer;
}

/* ── Loading spinner overlay ── */
.bkr-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,10,10,0.7);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: var(--bkr-radius);
    z-index: 10;
}
.bkr-player.bkr-buffering .bkr-loading-overlay {
    display: flex;
}
.bkr-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--bkr-border);
    border-top-color: var(--bkr-accent);
    border-radius: 50%;
    animation: bkr-spin 0.7s linear infinite;
}
@keyframes bkr-spin {
    to { transform: rotate(360deg); }
}

/* ── Error message ── */
.bkr-error {
    background: #1a0000;
    border-left: 3px solid #cc0000;
    padding: 10px 14px;
    font-family: var(--bkr-font);
    font-size: 13px;
    color: #ffaaaa;
    border-radius: 4px;
    margin: 1em 0;
}

/* Hidden helper */
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 360px) {
    .bkr-player { padding: 14px 14px 12px; }
    .bkr-logo   { width: 40px; height: 40px; }
    .bkr-btn-play { width: 40px; height: 40px; }
}
