/* Custom animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-500 {
    animation-delay: 500ms;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom select styling for dark background */
select option {
    background-color: #1f2937;
    color: white;
}

/* Focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* Backdrop blur support */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Checkbox styling for dark background */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.25rem;
    background-color: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

input[type="checkbox"]:checked {
    background-color: #ec4899;
    border-color: #ec4899;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

input[type="checkbox"]:focus {
    outline: none;
    ring: 2px;
    ring-color: #f472b6;
}

/* Custom audio player styling */
audio.audio-player-custom {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

audio.audio-player-custom::-webkit-media-controls-panel {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border-radius: 12px;
    padding: 8px;
}

audio.audio-player-custom::-webkit-media-controls-play-button {
    background-color: #ec4899;
    border-radius: 50%;
    margin-right: 8px;
}

audio.audio-player-custom::-webkit-media-controls-play-button:hover {
    background-color: #db2777;
}

audio.audio-player-custom::-webkit-media-controls-current-time-display,
audio.audio-player-custom::-webkit-media-controls-time-remaining-display {
    color: #6b7280;
    font-size: 12px;
    font-weight: 500;
}

audio.audio-player-custom::-webkit-media-controls-timeline {
    background-color: #e5e7eb;
    border-radius: 2px;
    height: 4px;
    margin: 0 8px;
}

audio.audio-player-custom::-webkit-media-controls-timeline::-webkit-slider-thumb {
    background-color: #ec4899;
    border-radius: 50%;
    width: 12px;
    height: 12px;
}

audio.audio-player-custom::-webkit-media-controls-volume-slider {
    background-color: #e5e7eb;
    border-radius: 2px;
    height: 4px;
}

audio.audio-player-custom::-webkit-media-controls-volume-slider::-webkit-slider-thumb {
    background-color: #ec4899;
    border-radius: 50%;
    width: 12px;
    height: 12px;
}

audio.audio-player-custom::-webkit-media-controls-mute-button {
    background-color: transparent;
    border-radius: 4px;
    margin-left: 8px;
}

/* Playing state animation */
.group.playing .audio-player-custom::-webkit-media-controls-play-button {
    animation: pulse-audio 1.5s ease-in-out infinite;
}

@keyframes pulse-audio {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Firefox audio player styling */
audio.audio-player-custom {
    filter: grayscale(0%);
}

/* Enhanced card hover effects */
.group:hover {
    transform: translateY(-8px);
}

.group.playing {
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.2);
}
