/**
 * Global Audio Player Styles - Simple Version
 */

.global-audio-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000000;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    background-color: rgba(42, 42, 42, 0.3);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(100%);
}

.global-audio-player.visible {
    transform: translateY(0);
}

/* Trigger zone (untere 20px) */
.player-trigger-zone {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    z-index: 9999999;
    pointer-events: auto;
}

/* Player content */
.player-content {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 12px 20px;
    position: relative;
}

/* Player logo */
.player-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    margin-left: 10px;
}

/* Track info */
.track-info {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 600px;
    text-align: left;
}

.track-title {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    text-align: left;
}

.track-time {
    font-size: 11px;
    color: #888888;
    font-family: 'Courier New', monospace;
    text-align: left;
}

.time-separator {
    margin: 0 4px;
    color: #666;
}

/* Player controls */
.player-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    margin-left: auto;
}

.global-audio-player .control-btn {
    background: rgba(255, 255, 255, 0.05) !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 16px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.global-audio-player .control-btn:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    transform: scale(1.1) !important;
}

.global-audio-player .control-btn:active {
    transform: scale(0.95) !important;
}

.global-audio-player #global-shuffle-btn {
    opacity: 0.5;
}

.global-audio-player #global-shuffle-btn.active {
    color: var(--accent-color, #888888) !important;
    opacity: 1;
}

.global-audio-player #global-shuffle-btn:hover {
    opacity: 0.8;
}

.global-audio-player .play-pause-btn {
    background-color: rgba(255, 255, 255, 0.08) !important;
    font-size: 18px !important;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
}

.global-audio-player .play-pause-btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

/* Progress bar */
.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: var(--accent-color, #888888);
    transition: width 0.1s linear;
    pointer-events: none;
}

.progress-bar:hover .progress-fill {
    background: var(--accent-color, #aaaaaa);
}

/* Playlist Panel */
.playlist-panel {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    max-height: 400px;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.85), rgba(20, 20, 20, 0.9));
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Volume Indicator (wie bei JukeBox) */
.volume-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--accent-color, #888888);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1001;
}

.volume-indicator.visible {
    opacity: 0.8;
}

.playlist-panel.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-header h3 {
    margin: 0;
    font-size: 16px;
    color: #ffffff;
}

.playlist-close {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.playlist-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.playlist-items {
    max-height: 340px;
    overflow-y: auto;
    padding: 10px;
}

.playlist-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    position: relative;
}

.playlist-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--accent-color, #888888);
    transition: none;
}

.playlist-item-remove {
    position: absolute;
    right: 15px;
    font-size: 16px;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
    z-index: 10;
}

.playlist-item:hover .playlist-item-remove {
    opacity: 1;
}

.playlist-item-remove:hover {
    transform: scale(1.2);
    color: #ff4444;
}

.playlist-item.active {
    background: rgba(136, 136, 136, 0.2);
    border-left-color: var(--accent-color, #888888);
}

.playlist-item-number {
    font-size: 12px;
    color: #666;
    min-width: 30px;
    font-family: 'Courier New', monospace;
}

.playlist-item-name {
    flex: 1;
    color: #ffffff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Scrollbar styling */
.playlist-items::-webkit-scrollbar {
    width: 8px;
}

.playlist-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.playlist-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.playlist-items::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive design */
@media (max-width: 768px) {
    .player-content {
        gap: 15px;
        padding: 10px 15px;
    }

    .player-logo {
        width: 40px;
        height: 40px;
        margin-left: 5px;
    }

    .track-info {
        flex: 0 0 150px;
    }

    .track-title {
        font-size: 12px;
    }

    .track-time {
        font-size: 10px;
    }

    .player-controls {
        gap: 10px;
    }

    .global-audio-player .control-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }

    .global-audio-player .play-pause-btn {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
    }

    .playlist-panel {
        max-height: 300px;
    }

    .playlist-items {
        max-height: 240px;
    }
}
