.floating-player {
    position: fixed;
    bottom: 0px;
    right: 0px;
    width: 400px;
    max-width: calc(100vw - 40px);
    background: white;
    border: 2px solid #334155;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transition: all 0.3s ease;
}

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

.floating-player.minimized {
    width: 300px;
}

.floating-player.minimized .floating-player-body {
    display: none;
}

.floating-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    border-radius: 10px 10px 0 0;
    cursor: move;
    user-select: none;
}

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

.floating-player-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

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

.floating-player-title {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-player-source {
    color: #cbd5e1;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-player-controls {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.floating-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.floating-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

.floating-btn:active {
    transform: scale(0.95);
}

.floating-btn:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

.minimize-icon {
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1;
}

.floating-player-body {
    padding: 16px;
    background: white;
    border-radius: 0 0 10px 10px;
}

.floating-audio-container audio {
    width: 100%;
    outline: none;
}

.floating-audio-container audio:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .floating-player {
        bottom: 0px;
        right: 0px;
        left: 0px;
        width: auto;
        max-width: none;
    }
    
    .floating-player.minimized {
        width: auto;
        right: 0px !important;
        left: auto;
    }
    
    .floating-player-title {
        font-size: 0.85rem;
    }
    
    .floating-player-source {
        font-size: 0.75rem;
    }
}

/* High contrast mode support */
body.high-contrast .floating-player {
    background: #000000;
    border-color: #ffffff;
}

body.high-contrast .floating-player-header {
    background: #000000;
    border-bottom: 2px solid #ffffff;
}

body.high-contrast .floating-player-title,
body.high-contrast .floating-player-source {
    color: #ffffff;
}

body.high-contrast .floating-btn {
    background: #000000;
    border-color: #ffffff;
    color: #ffffff;
}

body.high-contrast .floating-btn:hover {
    background: #ffff00;
    color: #000000;
}

body.high-contrast .floating-player-body {
    background: #000000;
}


@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.floating-player:not(.hidden) {
    animation: slideInUp 0.3s ease;
}