/* Cyberpunk Music Player Styles */
:root {
    --cp-red: #ff0000;
    --cp-red-dim: #8b0000;
    --cp-black: #050505;
    --cp-dark: #0a0a0a;
    --cp-gray: #1a1a1a;
    --cp-text: #ffffff;
    --cp-glitch-1: #ff0000;
    --cp-glitch-2: #00ffff;
}

#music-popup {
    backdrop-filter: blur(8px);
}

.music-player-container {
    background: var(--cp-black);
    border: 2px solid var(--cp-red);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.2), inset 0 0 20px rgba(255, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

/* Diagonal cut corner effect */
.cyber-cut {
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}

.music-player-header {
    border-bottom: 1px solid rgba(255, 0, 0, 0.3);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, rgba(255, 0, 0, 0.1), transparent);
}

.music-player-title {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--cp-red);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.music-player-body {
    padding: 2rem;
}

/* Album Art Section */
.album-art-wrapper {
    position: relative;
    width: 140px;
    height: 140px;
    border: 1px solid var(--cp-red-dim);
    margin-right: 2rem;
    background: var(--cp-dark);
}

.album-art-wrapper::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    width: 20px;
    height: 20px;
    border-top: 2px solid var(--cp-red);
    border-left: 2px solid var(--cp-red);
}

.album-art-wrapper::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid var(--cp-red);
    border-right: 2px solid var(--cp-red);
}

.album-art-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cp-red-dim);
}

/* Track Info */
.track-info-container {
    flex: 1;
    min-width: 0;
}

.track-name {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--cp-text);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.track-artist {
    color: var(--cp-red);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.875rem;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

/* Progress Bar */
.cyber-progress-container {
    width: 100%;
    height: 6px;
    background: var(--cp-gray);
    position: relative;
    cursor: pointer;
    margin-bottom: 1rem;
}

.cyber-progress-bar {
    height: 100%;
    background: var(--cp-red);
    box-shadow: 0 0 15px var(--cp-red);
    position: relative;
    transition: width 0.1s linear;
}

.cyber-progress-bar::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 4px;
    height: 14px;
    background: var(--cp-text);
    box-shadow: 0 0 10px var(--cp-text);
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #666;
}

/* Controls */
.music-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    margin: 2rem 0;
}

.control-btn {
    background: transparent;
    border: none;
    color: #555;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    color: var(--cp-red);
    filter: drop-shadow(0 0 5px var(--cp-red));
}

.play-pause-btn {
    width: 70px;
    height: 70px;
    background: var(--cp-black);
    border: 2px solid var(--cp-red);
    color: var(--cp-red);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    transition: all 0.3s estate;
}

.play-pause-btn:hover {
    background: var(--cp-red);
    color: var(--cp-black);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    transform: scale(1.05);
}

/* Playlist */
.cyber-playlist {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
}

.cyber-playlist::-webkit-scrollbar {
    width: 4px;
}

.cyber-playlist::-webkit-scrollbar-track {
    background: var(--cp-black);
}

.cyber-playlist::-webkit-scrollbar-thumb {
    background: var(--cp-red-dim);
}

.playlist-item {
    background: rgba(255, 0, 0, 0.02);
    border-left: 3px solid transparent;
    padding: 0.75rem 1rem;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-item:hover {
    background: rgba(255, 0, 0, 0.08);
    border-left-color: var(--cp-red-dim);
}

.playlist-item.active {
    background: rgba(255, 0, 0, 0.15);
    border-left-color: var(--cp-red);
}

.playlist-item-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.playlist-index {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #444;
}

.playlist-item.active .playlist-index {
    color: var(--cp-red);
}

.playlist-item-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #aaa;
}

.playlist-item.active .playlist-item-name {
    color: white;
}

/* Scanline Effect */
.scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg,
            rgba(255, 0, 0, 0.03),
            rgba(0, 255, 0, 0.01),
            rgba(0, 0, 255, 0.03));
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 10;
    opacity: 0.3;
}

/* Glitch Animation */
@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

.glitch-hover:hover {
    animation: glitch 0.3s infinite;
    text-shadow: 2px 0 var(--cp-glitch-2), -2px 0 var(--cp-glitch-1);
}