* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d605c;
    --secondary-color: #c3f6ea;
    --accent-color: #f7dfe9;
    --dark-bg: #0a0a0a;
    --light-bg: #1a1a1a;
    --text-color: #ffffff;
    --text-secondary: #888;
    --hover-color: #2a2a2a;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(to right, #e8efca, #c3f6ea, #f7dfe9, #d3fce6, #f0f5ca);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
    overflow-x: hidden;
}

/* Container  */
.player-container {
    width: 100%;
    max-width: 600px; 
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 25px; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
}

/* Header */
.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px; 
    background: rgba(0, 0, 0, 0.3);
    position: relative;
}

.back-btn, .menu-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem; 
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.back-btn:hover, .menu-btn:hover {
    background: var(--hover-color);
}

.player-header h1 {
    font-size: 1.3rem; 
    font-weight: 600;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Menu Dropdown */
.menu-dropdown {
    position: absolute;
    top: 65px; 
    right: 25px;
    background: rgba(26, 26, 26, 0.98);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    padding: 8px 0;
    min-width: 180px; 
    display: none;
    z-index: 1000;
}

.menu-dropdown.show {
    display: block;
}

.menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.menu-dropdown a:hover {
    background: var(--hover-color);
    color: var(--secondary-color);
}

/* Visualizer */
.visualizer-container {
    height: 220px; 
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(45, 96, 92, 0.1) 0%, transparent 70%);
}

#visualizer {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.album-art {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px; 
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem; 
    color: white;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) translateY(0px); }
    50% { transform: translate(-50%, -50%) translateY(-8px); }
}

.album-art.playing {
    animation: float 6s ease-in-out infinite, rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Song Info */
.song-info {
    text-align: center;
    padding: 15px 25px; 
}

.song-info h2 {
    font-size: 1.3rem; 
    font-weight: 600;
    margin-bottom: 4px;
}

.song-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Progress Bar */
.progress-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 25px;
    margin-bottom: 20px; 
}

.time {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 40px;
}

.progress-bar {
    flex: 1;
    height: 5px; 
    background: var(--hover-color);
    border-radius: 3px;
    position: relative;
    cursor: pointer;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    width: 0%;
    position: relative;
    transition: width 0.1s linear;
}

.progress-dot {
    position: absolute;
    right: -7px;
    top: -5px;
    width: 14px; 
    height: 14px;
    background: var(--secondary-color);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.progress-bar:hover .progress-dot {
    opacity: 1;
}

/* Controls */
.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px; 
    padding: 0 25px;
    margin-bottom: 20px;
}

.control-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem; 
    cursor: pointer;
    padding: 12px; 
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.control-btn:hover {
    background: var(--hover-color);
    transform: scale(1.1);
}

.control-btn.active {
    color: var(--secondary-color);
}

.main-btn {
    width: 55px; 
    height: 55px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    font-size: 1.3rem; 
}

.main-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 15px rgba(195, 246, 234, 0.3);
}

/* Volume Control */
.volume-control {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 25px;
    margin-bottom: 20px;
}

.volume-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.volume-btn:hover {
    background: var(--hover-color);
}

#volumeSlider {
    flex: 1;
    height: 5px;
    background: var(--hover-color);
    border-radius: 3px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

#volumeSlider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

#volumeSlider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(195, 246, 234, 0.5);
}

.volume-percent {
    color: var(--text-secondary);
    font-size: 0.8rem;
    min-width: 35px;
}

/* Playlist */
.playlist-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px 25px;
    max-height: 300px; 
    overflow-y: auto;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.playlist-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.playlist-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.save-btn, .load-btn {
    background: var(--hover-color);
    border: none;
    color: var(--text-color);
    padding: 6px 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.save-btn:hover, .load-btn:hover {
    background: var(--primary-color);
    color: white;
}

.add-btn {
    background: var(--primary-color);
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.add-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.playlist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px; 
    background: var(--hover-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.playlist-item:hover {
    background: rgba(45, 96, 92, 0.2);
    transform: translateX(4px);
}

.playlist-item.active {
    background: linear-gradient(135deg, rgba(45, 96, 92, 0.3), rgba(195, 246, 234, 0.2));
    border-left: 3px solid var(--secondary-color);
}

.item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-number {
    color: var(--text-secondary);
    font-size: 0.85rem;
    min-width: 18px;
}

.playlist-item.active .item-number {
    color: var(--secondary-color);
}

.item-details h4 {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.item-details p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.item-duration {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.delete-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 4px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.playlist-item:hover .delete-btn {
    opacity: 1;
}

.delete-btn:hover {
    color: #ff4444;
    transform: scale(1.2);
}

/* Visualizer Modes */
.visualizer-modes {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
}

.mode-btn {
    background: var(--hover-color);
    border: none;
    color: var(--text-color);
    padding: 6px 16px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: rgba(45, 96, 92, 0.3);
}

.mode-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Notifications */
.notification {
    position: fixed;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    font-size: 0.9rem;
}

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

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

/* Scrollbar */
.playlist-container::-webkit-scrollbar {
    width: 5px;
}

.playlist-container::-webkit-scrollbar-track {
    background: var(--hover-color);
    border-radius: 3px;
}

.playlist-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.playlist-container::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Responsive für größere Bildschirme */
@media (min-width: 1400px) {
    .player-container {
        max-width: 550px; 
    }
}

/* Responsive für kleinere Bildschirme */
@media (max-width: 768px) {
    .player-container {
        max-width: 100%;
        border-radius: 20px;
    }
    
    .visualizer-container {
        height: 180px;
    }
    
    .album-art {
        width: 90px;
        height: 90px;
        font-size: 2rem;
    }
    
    .controls {
        gap: 10px;
    }
    
    .control-btn {
        font-size: 1rem;
        padding: 10px;
    }
    
    .main-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .playlist-controls {
        flex-wrap: wrap;
    }
    
    .menu-dropdown {
        right: 15px;
    }
}

/* Sehr kleine Bildschirme */
@media (max-width: 480px) {
    body {
        padding: 5px;
    }
    
    .player-header {
        padding: 15px 20px;
    }
    
    .player-header h1 {
        font-size: 1.1rem;
    }
    
    .visualizer-container {
        height: 150px;
    }
    
    .album-art {
        width: 80px;
        height: 80px;
        font-size: 1.8rem;
    }
    
    .song-info h2 {
        font-size: 1.1rem;
    }
    
    .song-info p {
        font-size: 0.85rem;
    }
    
    .main-btn {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .playlist-container {
        max-height: 250px;
    }
}