/* Neon cyberpunk skin for HTML5 audio player */
audio {
    border-radius: 8px;
    width: 100%;
    border-style: none;
    padding-bottom: 5px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* Hide native audio controls */
.snd-player-container audio {
    display: none !important;
}

/* Cyberpunk neon player design */
.snd-controls {
    display: grid;
    grid-template-columns: 60px 1fr auto auto;
    grid-template-rows: auto auto;
    gap: 0;
    background: linear-gradient(45deg, #0a0a0a, #1a0a1a) !important;
    padding: 0;
    border-radius: 8px;
    min-height: 60px;
    box-sizing: border-box;
    position: relative;
    overflow: visible;
    border: 1px solid #00ffff;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 20px rgba(255, 0, 255, 0.1);
}

/* Neon accent border */
.snd-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #ffff00, #00ffff);
    border-radius: 8px 8px 0 0;
    animation: neon-flow 3s linear infinite;
}

@keyframes neon-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Cyberpunk play button */
.snd-play-btn {
    grid-column: 1;
    grid-row: 1 / 3;
    background: transparent;
    border: 1px solid #00ffff;
    color: #00ffff;
    border-radius: 0;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: block;
    text-align: center;
    line-height: 58px;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.2);
    font-size: 28px;
    font-weight: bold;
    align-self: center;
    justify-self: start;
    outline: none;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    text-shadow: 0 0 10px #00ffff;
}

.snd-play-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 20px #00ffff, inset 0 0 20px rgba(0, 255, 255, 0.3);
    color: #ffffff;
    text-shadow: 0 0 15px #00ffff;
}

/* Fix for play/pause icons to allow clicks to pass through to button */
.snd-icon-play,
.snd-icon-pause {
    pointer-events: none;
    display: inline-block;
}

/* Neon progress bar */
.snd-progress {
    grid-column: 2;
    grid-row: 2;
    flex: 1;
    height: 6px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 0;
    cursor: pointer;
    position: relative;
    overflow: visible;
    border: 1px solid rgba(0, 255, 255, 0.3);
    margin-left: 8px;
    margin-right: 0;
    align-self: center;
    margin-top: -3px;
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.2);
}

/* Navigation buttons */
.snd-prev-btn,
.snd-next-btn {
    background: transparent !important;
    border: 1px solid rgba(0, 255, 255, 0.3) !important;
    color: #00ffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
    grid-row: 2;
    align-self: center;
    width: 40px;
    height: 30px;
    padding: 0;
    box-shadow: none !important;
    outline: none !important;
    text-shadow: 0 0 8px #00ffff;
}

.snd-prev-btn {
    grid-column: 3;
    margin-left: 0;
    margin-right: 0;
}

.snd-next-btn {
    grid-column: 4;
    margin-left: 0;
    margin-right: 0;
}

.snd-prev-btn:hover,
.snd-next-btn:hover {
    color: #ffffff !important;
    background: rgba(0, 255, 255, 0.1) !important;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5) !important;
    text-shadow: 0 0 15px #00ffff;
}

/* Cyberpunk player wrapper */
.snd-player-wrapper {
    background: linear-gradient(135deg, #000000, #1a0a1a);
    border-radius: 8px;
    padding: 8px;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.3),
        inset 0 1px 0 rgba(0, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 255, 255, 0.3);
}

.snd-player-wrapper:hover {
    box-shadow: 
        0 0 40px rgba(0, 255, 255, 0.5),
        inset 0 1px 0 rgba(0, 255, 255, 0.2);
}

/* Neon time display */
.snd-time-display,
.snd-time {
    grid-column: 2 / 5;
    grid-row: 1;
    color: #00ffff;
    font-size: 11px;
    text-align: right;
    align-self: end;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 8px #00ffff;
    font-weight: 500;
    margin-left: 0;
    margin-bottom: 2px;
    margin-right: 4px;
    padding-right: 2px;
    display: block;
    z-index: 2;
    position: relative;
    font-family: 'Courier New', monospace;
}

/* Neon progress handle */
.snd-progress-handle {
    position: absolute;
    top: -2px;
    left: 0;
    width: 16px;
    height: 8px;
    background: linear-gradient(45deg, #00ffff, #ffffff);
    border: 1px solid #00ffff;
    border-radius: 0;
    cursor: grab;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    margin-left: -8px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.8);
    z-index: 2;
}

.snd-progress:hover .snd-progress-handle,
.snd-progress.seeking .snd-progress-handle {
    opacity: 1;
}

.snd-progress-handle:hover {
    background: linear-gradient(45deg, #ffffff, #00ffff);
    box-shadow: 0 0 20px rgba(0, 255, 255, 1);
}

.snd-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #ffff00);
    border-radius: 0;
    width: 0%;
    transition: width 0.1s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.snd-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: cyber-shine 2s infinite;
}

@keyframes cyber-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Cyberpunk track title */
.snd-current-track-title {
    grid-column: 2;
    grid-row: 1;
    color: #00ffff;
    font-size: 13px;
    text-align: left;
    align-self: end;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 10px #00ffff;
    font-weight: 600;
    margin-left: 8px;
    margin-bottom: 4px;
    margin-right: 20px;
    z-index: 3;
    position: relative;
    font-family: 'Courier New', monospace;
    animation: neon-pulse 2s ease-in-out infinite alternate;
}

@keyframes neon-pulse {
    0% { text-shadow: 0 0 5px #00ffff; }
    100% { text-shadow: 0 0 15px #00ffff, 0 0 25px #00ffff; }
}

/* Cyberpunk tooltip */
.snd-progress-tooltip {
    position: absolute;
    top: 20px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.95);
    color: #00ffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 10;
    border: 1px solid #00ffff;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    text-shadow: 0 0 8px #00ffff;
}

/* Cyberpunk track list styling */
.snd-track-list {
    margin: 10px 0 0 0;
    padding: 0;
    list-style: none;
    border: none;
    border-radius: 4px;
    background: #000000;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

/* Cyberpunk track item styling */
.snd-track-item {
    padding: 5px 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    background: transparent;
}

.snd-track-item:last-child {
    border-bottom: none;
}

.snd-track-item:hover {
    background-color: rgba(0, 255, 255, 0.1);
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.2);
}

.snd-track-item.active,
.snd-track-item.snd-active-track {
    background-color: rgba(0, 255, 255, 0.2);
    color: #ffffff !important;
    position: relative;
    box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.3);
}

/* Cyberpunk neon stripe for active track */
.snd-track-item.active::before,
.snd-track-item.snd-active-track::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(45deg, #00ffff, #ff0080, #8000ff, #00ff80, #ffff00, #ff4000);
    background-size: 300% 300%;
    border-radius: 0 2px 2px 0;
    animation: cyber-stripe-flow 3s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 255, 255, 1), 0 0 25px rgba(255, 0, 128, 0.5);
}

@keyframes cyber-stripe-flow {
    0% { 
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(0, 255, 255, 0.8), 0 0 20px rgba(255, 0, 128, 0.3);
    }
    25% {
        background-position: 50% 100%;
        box-shadow: 0 0 15px rgba(255, 0, 128, 1), 0 0 25px rgba(128, 0, 255, 0.5);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 20px rgba(128, 0, 255, 1), 0 0 30px rgba(0, 255, 128, 0.5);
    }
    75% {
        background-position: 50% 0%;
        box-shadow: 0 0 15px rgba(0, 255, 128, 1), 0 0 25px rgba(255, 255, 0, 0.5);
    }
    100% { 
        background-position: 0% 50%;
        box-shadow: 0 0 10px rgba(255, 255, 0, 0.8), 0 0 20px rgba(255, 64, 0, 0.3);
    }
}

/* Cyberpunk track title styling */
.snd-track-title {
    flex: 1;
    font-weight: 500;
    font-size: 0.9em;
    padding: 0;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.8);
}

.snd-track-item:hover .snd-track-title {
    color: #ffffff;
    text-shadow: 0 0 12px rgba(0, 255, 255, 1);
}

.snd-track-item.active .snd-track-title,
.snd-track-item.snd-active-track .snd-track-title {
    color: #ffffff !important;
    text-shadow: 0 0 15px rgba(0, 255, 255, 1);
    animation: cyber-text-pulse 2s ease-in-out infinite alternate;
}

@keyframes cyber-text-pulse {
    0% { text-shadow: 0 0 10px rgba(0, 255, 255, 0.8); }
    100% { text-shadow: 0 0 20px rgba(0, 255, 255, 1), 0 0 30px rgba(255, 0, 255, 0.5); }
}

.snd-track-duration {
    color: #666666;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.snd-track-item:hover .snd-track-duration {
    color: #cccccc;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5);
}

.snd-track-item.active .snd-track-duration,
.snd-track-item.snd-active-track .snd-track-duration {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
}

/* Track info styling - above the progress bar */
.snd-track-title-display {
    color: #00ffff;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
}

/* Hide the default "Now Playing •" text when current track title is present */
.snd-controls:has(.snd-current-track-title)::after {
    display: none;
}

/* Single player mode */
.snd-single-player .snd-player-container:not(:first-child) {
    display: none;
}
