/* ===================================
   Floating Player - Sticky kontrolok
   Minden oldalon elérhető lejátszó
   =================================== */

/* Floating Player Container */
.floating-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(26, 26, 26, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 2px solid rgba(255, 0, 85, 0.3);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 15px 20px;
}

.floating-player.visible {
    transform: translateY(0);
}

.floating-player.minimized {
    padding: 10px 20px;
}

/* Player Inner Container */
.floating-player-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 25px;
}

/* Track Info Section */
.floating-track-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.floating-album-art {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.3);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.floating-player.minimized .floating-album-art {
    width: 50px;
    height: 50px;
}

.floating-album-art.playing {
    animation: albumRotate 20s linear infinite;
}

@keyframes albumRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.floating-track-details {
    flex: 1;
    min-width: 0;
}

.floating-track-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floating-track-artist {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Player Controls */
.floating-player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.floating-play-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #d4004f);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(255, 0, 85, 0.4);
    flex-shrink: 0;
}

.floating-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(255, 0, 85, 0.6);
}

.floating-play-btn:active {
    transform: scale(0.95);
}

.floating-play-btn i {
    transition: transform 0.2s ease;
}

.floating-play-btn.playing i.fa-play {
    display: none;
}

.floating-play-btn.playing i.fa-pause {
    display: block;
}

.floating-play-btn i.fa-pause {
    display: none;
}

/* Volume Controls */
.floating-volume-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

.floating-volume-icon {
    color: var(--accent-color);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.floating-volume-icon:hover {
    color: #ffffff;
}

.floating-volume-slider {
    width: 120px;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.floating-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #d4004f);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(255, 0, 85, 0.5);
    transition: all 0.3s ease;
}

.floating-volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 15px rgba(255, 0, 85, 0.7);
}

.floating-volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #d4004f);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 10px rgba(255, 0, 85, 0.5);
    transition: all 0.3s ease;
}

.floating-volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 15px rgba(255, 0, 85, 0.7);
}

/* Extra Controls */
.floating-extra-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.floating-control-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.floating-control-btn:hover {
    color: var(--accent-color);
    background: rgba(255, 0, 85, 0.1);
}

.floating-control-btn.active {
    color: var(--accent-color);
}

/* Listeners Count */
.floating-listeners {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    flex-shrink: 0;
}

.floating-listeners i {
    color: var(--accent-color);
}

/* Quality Selector */
.floating-quality-wrapper {
    position: relative;
    flex-shrink: 0;
}

.floating-quality-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.floating-quality-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.floating-quality-btn i {
    color: var(--accent-color);
    font-size: 0.85rem;
}

.floating-quality-menu {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: rgba(20, 20, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.floating-quality-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.quality-option {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quality-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.quality-option i {
    color: var(--accent-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.quality-option.active i {
    opacity: 1;
}

.quality-option span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.quality-option small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.quality-option.active span {
    color: var(--accent-color);
    font-weight: 500;
}

/* Minimize/Close Button */
.floating-minimize-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1rem;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
    border-radius: 8px;
    flex-shrink: 0;
}

.floating-minimize-btn:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.1);
}

/* Status Indicator */
.floating-status {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.floating-status.loading {
    background: #ffaa00;
    box-shadow: 0 0 10px #ffaa00;
}

.floating-status.error {
    background: #ff0000;
    box-shadow: 0 0 10px #ff0000;
}

/* Responsive Design */
@media (max-width: 968px) {
    .floating-player-inner {
        gap: 15px;
    }
    
    .floating-volume-slider {
        width: 80px;
    }
    
    .floating-listeners {
        display: none;
    }
    
    .floating-extra-controls {
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .floating-player {
        padding: 10px 15px;
    }
    
    .floating-player-inner {
        gap: 10px;
    }
    
    .floating-album-art {
        width: 50px;
        height: 50px;
    }
    
    .floating-track-title {
        font-size: 0.9rem;
    }
    
    .floating-track-artist {
        font-size: 0.75rem;
    }
    
    .floating-play-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .floating-volume-control {
        gap: 8px;
        padding: 0 5px;
    }
    
    .floating-volume-slider {
        width: 60px;
    }
    
    .floating-extra-controls {
        display: none;
    }
}

@media (max-width: 480px) {
    .floating-track-details {
        max-width: 150px;
    }
    
    .floating-volume-control {
        display: none;
    }
}

/* Loading Animation */
.floating-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--accent-color);
    font-size: 1.5rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.floating-player.loading .floating-loading {
    display: block;
}

/* Equalizer Animation */
.floating-equalizer {
    display: none;
    align-items: flex-end;
    gap: 3px;
    height: 20px;
    margin-right: 10px;
}

.floating-equalizer span {
    width: 3px;
    background: var(--accent-color);
    border-radius: 2px;
    animation: equalize 1s ease-in-out infinite;
}

.floating-equalizer span:nth-child(1) { animation-delay: 0s; }
.floating-equalizer span:nth-child(2) { animation-delay: 0.2s; }
.floating-equalizer span:nth-child(3) { animation-delay: 0.4s; }
.floating-equalizer span:nth-child(4) { animation-delay: 0.6s; }

@keyframes equalize {
    0%, 100% { height: 5px; }
    50% { height: 20px; }
}

.floating-player.playing .floating-equalizer {
    display: flex;
}
