/* ========================================
   MAIN PLAYER (Homepage)
   ======================================== */
.main-player {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 32px;
    max-width: 700px;
    margin: 0 auto;
}

.player-artwork {
    position: relative;
    flex-shrink: 0;
}

.player-image {
    width: 180px;
    height: 180px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: var(--shadow-md);
}

.player-pulse {
    position: absolute;
    inset: -8px;
    border-radius: calc(var(--radius-lg) + 8px);
    border: 2px solid var(--blue-light);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.main-player.playing .player-pulse {
    opacity: 1;
    animation: pulse 2s ease-in-out infinite;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-station-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-station-category {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.player-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.player-btn:hover {
    background: var(--blue-muted);
    border-color: var(--border-glow);
}

.player-btn .material-icons {
    font-size: 22px;
}

.player-btn-main {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--blue), var(--blue-light));
    border: none;
    box-shadow: 0 4px 20px var(--blue-glow);
}

.player-btn-main:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(41, 80, 170, 0.5);
}

.player-btn-main .material-icons {
    font-size: 28px;
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.volume-icon {
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.volume-icon:hover {
    color: var(--blue-light);
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 140px;
    height: 4px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--blue-light);
    box-shadow: 0 0 8px var(--blue-glow);
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 8px;
    background: var(--blue-light);
    box-shadow: 0 0 8px var(--blue-glow);
    border: none;
    cursor: pointer;
}

.volume-slider-sm {
    width: 80px;
}

.volume-value {
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 32px;
}

/* ========================================
   FLOATING PLAYER BAR
   ======================================== */
.floating-player {
    position: fixed;
    bottom: 24px;
    left: calc(var(--sidebar-width, 260px) + 24px);
    right: 24px;
    margin: 0 auto;
    max-width: var(--container-max);
    z-index: 900;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(calc(100% + 48px));
    transition: transform var(--transition-smooth);
}

.floating-player.active {
    transform: translateY(0);
}

.floating-player-inner {
    width: 100%;
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
}

.floating-player-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.floating-player-img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

/* Logo wrapper with flag badge */
.floating-player-logo-wrap {
    position: relative;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
}

.floating-player-logo-wrap .floating-player-img {
    width: 100%;
    height: 100%;
    border-radius: 20%;
    border: 2px solid #2950aa;

}

.floating-player-flag {
    position: absolute;
    bottom: -8px;
    right: 21px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #2950aa;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    background: #fff;
    align-items: center;
    justify-content: center;
}

.floating-flag-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.floating-player-name {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.floating-player-cat {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.floating-player-controls {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.floating-btn {
    width: 48px;
    height: 48px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.floating-btn:hover {
    background: var(--blue-muted);
}

.floating-btn .material-icons {
    font-size: 26px;
}

.floating-btn-main {
    width: 56px;
    height: 56px;
    background: var(--blue);
    box-shadow: 0 4px 16px var(--blue-glow);
    color: #ffffff;
}

.floating-btn-main:hover {
    background: var(--blue-light);
}

.floating-btn-main .material-icons {
    color: #ffffff;
}

.floating-player-volume {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
    flex: 1;
}

.floating-player-volume .material-icons {
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
}

/* ========================================
   RESPONSIVE - Player
   ======================================== */
@media (max-width: 900px) {
    .floating-player {
        left: 24px;
    }
}

@media (max-width: 768px) {
    .main-player {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 24px;
    }

    .player-image {
        width: 140px;
        height: 140px;
    }

    .player-controls {
        justify-content: center;
    }

    .volume-control {
        justify-content: center;
    }

    .floating-player-volume {
        display: none;
    }

    .floating-player {
        bottom: 16px;
        left: 16px;
        right: 16px;
    }

    .floating-player-inner {
        padding: 12px 20px;
        gap: 16px;
        justify-content: space-between;
    }

    .floating-player-controls {
        position: static;
        transform: none;
    }
}

@media (max-width: 480px) {
    .player-image {
        width: 120px;
        height: 120px;
    }

    /* Mobile player bar — show everything */
    .floating-player {
        bottom: 12px;
        left: 10px;
        right: 10px;
        border-radius: 16px;
    }

    .floating-player-inner {
        padding: 10px 14px;
        gap: 10px;
    }

    /* Smaller logo on mobile */
    .floating-player-logo-wrap {
        width: 48px;
        height: 48px;
        flex-shrink: 0;
    }

    .floating-player-flag {
        width: 16px;
        height: 16px;
        bottom: -5px;
        right: 14px;
    }

    /* Text block fills remaining space */
    .floating-player-text {
        flex: 1;
        min-width: 0;
        gap: 3px;
    }

    /* Station name — truncate if too long */
    .floating-player-name {
        font-size: 0.9rem;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 0;
    }

    /* Badge + category row — keep visible */
    .floating-player-cat-row {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-wrap: nowrap;
    }

    .floating-live-badge {
        font-size: 0.55rem;
        padding: 2px 6px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .floating-player-cat {
        font-size: 0.78rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Fav icon — keep visible and compact */
    .floating-inline-fav {
        width: 24px;
        height: 24px;
        flex-shrink: 0;
    }

    .floating-inline-fav .material-icons {
        font-size: 16px;
    }

    /* Play button — keep compact */
    .floating-btn-main {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }

    .floating-btn-main .material-icons {
        font-size: 22px;
    }
}

/* ═══════════════════════════════════════════
   PLAYER BAR — Name row + Live badge
   ═══════════════════════════════════════════ */

/* Text wrapper */
.floating-player-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

/* Name + inline fav row */
.floating-player-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.floating-player-name-row .floating-player-name {
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Inline fav button (next to name) */
.floating-inline-fav {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.floating-inline-fav .material-icons {
    font-size: 18px;
    line-height: 1;
}

.floating-inline-fav:hover {
    color: #e53935;
    background: rgba(229, 57, 53, 0.08);
    transform: scale(1.15);
}

.floating-inline-fav.active {
    color: #e53935;
}

.floating-inline-fav.active .material-icons {
    color: #e53935;
}

/* Category + badge row */
.floating-player-cat-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* EN DIRECT badge */
.floating-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(229, 57, 53, 0.12);
    border: 1px solid rgba(229, 57, 53, 0.25);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #e53935;
    white-space: nowrap;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* Pulsing red dot */
.floating-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e53935;
    flex-shrink: 0;
    animation: livePulse 1.4s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1;   transform: scale(1);    box-shadow: 0 0 0 0 rgba(229,57,53,0.5); }
    50%       { opacity: 0.7; transform: scale(1.2);  box-shadow: 0 0 0 4px rgba(229,57,53,0); }
}
