/* ==========================================================
   OSSVARIUM CATACOMB RADIO — UNIVERSAL FLOATING MINI-PLAYER
   ========================================================== */

:root {
    --blood-red: #8a2b2b;
    --glowing-red: #e23a3a;
    --dark-bg: #090606;
    --panel-bg: #140a0a;
    --parchment: #e8d8ce;
    --gold-accent: #c5a059;
}

.floating-radio-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999999;
    background: rgba(12, 5, 5, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 2px solid var(--blood-red, #8a2b2b);
    box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.85), 0 0 18px rgba(138, 43, 43, 0.3);
    padding: 10px 18px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    transform: translateY(115%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
}

.floating-radio-bar.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.floating-progress-rail {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

.floating-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8a2b2b, #ff4444);
    box-shadow: 0 0 6px rgba(255, 68, 68, 0.6);
    transition: width 0.1s linear;
}

.floating-bar-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.floating-track-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

.floating-track-info:hover {
    opacity: 0.85;
}

.floating-cover-wrap {
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.floating-cover {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid var(--blood-red, #8a2b2b);
    object-fit: cover;
    background: #000;
    display: block;
}

.floating-onair-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff3333;
    border: 1px solid #000;
}

.floating-onair-dot.pulsing {
    animation: floatingDotPulse 1.4s infinite;
}

@keyframes floatingDotPulse {
    0% { transform: scale(1); opacity: 0.9; box-shadow: 0 0 0 0 rgba(255, 51, 51, 0.7); }
    70% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 0 6px rgba(255, 51, 51, 0); }
    100% { transform: scale(1); opacity: 0.9; box-shadow: 0 0 0 0 rgba(255, 51, 51, 0); }
}

.floating-text {
    min-width: 0;
    overflow: hidden;
}

.floating-title {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--parchment, #e8d8ce);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.05em;
    line-height: 1.2;
}

.floating-artist {
    font-size: 0.72rem;
    color: #9c8e82;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.03em;
    line-height: 1.2;
    margin-top: 2px;
}

.floating-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.floating-btn {
    background: rgba(20, 10, 10, 0.8);
    border: 1px solid rgba(138, 43, 43, 0.5);
    color: var(--parchment, #e8d8ce);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    user-select: none;
}

.floating-btn:hover {
    background: #2a0e0e;
    border-color: #ff4444;
    color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 68, 68, 0.4);
}

.floating-play-btn {
    background: #3a1010;
    border-color: var(--blood-red, #8a2b2b);
    color: #ffffff;
    font-size: 0.95rem;
    padding: 6px 12px;
    min-width: 38px;
}

.floating-play-btn:hover {
    background: #501616;
}

.floating-play-btn.needs-gesture {
    animation: floatingPlayGlow 1.6s infinite ease-in-out;
}

@keyframes floatingPlayGlow {
    0%, 100% { box-shadow: 0 0 4px rgba(255, 68, 68, 0.4); border-color: #8a2b2b; }
    50% { box-shadow: 0 0 14px rgba(255, 68, 68, 0.85); border-color: #ff4444; }
}


.floating-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.floating-buy-link {
    background: linear-gradient(135deg, #421010 0%, #1a0606 100%);
    border: 1px solid var(--gold-accent, #c5a059);
    color: var(--gold-accent, #c5a059);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.floating-buy-link:hover {
    background: #5a1515;
    color: #fff;
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(197, 160, 89, 0.4);
}

.floating-dismiss-btn {
    background: transparent;
    border: none;
    color: #665555;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    transition: color 0.2s ease;
}

.floating-dismiss-btn:hover {
    color: #e8d8ce;
}

/* Offset admin button and footer if player is active */
body.has-floating-player #adminPendingLink {
    bottom: calc(max(20px, env(safe-area-inset-bottom)) + 74px) !important;
    z-index: 9999998 !important;
}

body.has-floating-player {
    padding-bottom: 74px !important;
}

@media (max-width: 480px) {
    .floating-buy-link {
        display: none !important;
    }
}
