/* Custom Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 0, 110, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 0, 110, 0.8), 0 0 30px rgba(131, 56, 236, 0.6);
    }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 1s ease-out;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-slide-up {
    animation: slide-up 0.5s ease-out;
}

/* Navigation Links */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    color: #9ca3af;
}

.nav-link:hover {
    color: #FF006E;
}

.nav-link.active {
    color: #FF006E;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: linear-gradient(90deg, #FF006E, #8338EC);
    border-radius: 2px;
}

/* Filter Elements */
.filter-select {
    background-color: #1f2937;
    border: 1px solid #374151;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-select:focus {
    border-color: #FF006E;
    box-shadow: 0 0 0 3px rgba(255, 0, 110, 0.1);
}

.filter-select:hover {
    border-color: #4b5563;
}

/* Sound Card */
.sound-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #374151;
    cursor: pointer;
    position: relative;
}

.sound-card:hover {
    transform: translateY(-8px);
    border-color: #FF006E;
    box-shadow: 0 20px 40px rgba(255, 0, 110, 0.3), 0 0 20px rgba(131, 56, 236, 0.2);
}

.sound-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF006E, #8338EC, #3A86FF);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sound-card:hover::before {
    opacity: 1;
}

.sound-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sound-card:hover .sound-card-image {
    transform: scale(1.1);
}

.sound-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-card:hover .sound-card-overlay {
    opacity: 1;
}

.play-overlay-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF006E, #8338EC);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    transition: transform 0.3s ease;
}

.play-overlay-btn:hover {
    transform: scale(1.2);
}

/* Tags */
.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tag-platform {
    background: rgba(58, 134, 255, 0.2);
    color: #3A86FF;
    border: 1px solid rgba(58, 134, 255, 0.3);
}

.tag-category {
    background: rgba(255, 0, 110, 0.2);
    color: #FF006E;
    border: 1px solid rgba(255, 0, 110, 0.3);
}

.tag-genre {
    background: rgba(131, 56, 236, 0.2);
    color: #8338EC;
    border: 1px solid rgba(131, 56, 236, 0.3);
}

.tag-mood {
    background: rgba(6, 255, 165, 0.2);
    color: #06FFA5;
    border: 1px solid rgba(6, 255, 165, 0.3);
}

.tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Stats Card */
.stat-card {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border-radius: 1rem;
    border: 1px solid #374151;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #FF006E;
    transform: translateY(-4px);
}

/* Progress Bar */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: #374151;
    border-radius: 5px;
    height: 6px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF006E, #8338EC);
    cursor: pointer;
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.8);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF006E, #8338EC);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 0, 110, 0.8);
}

/* Favorite Button */
.favorite-btn {
    transition: all 0.3s ease;
}

.favorite-btn.active {
    color: #FF006E;
}

.favorite-btn.active i {
    animation: heart-beat 0.5s ease;
}

@keyframes heart-beat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(0.9);
    }
    75% {
        transform: scale(1.2);
    }
}

/* Trending Badge */
.trending-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: linear-gradient(135deg, #FF006E, #FFBE0B);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Waveform Animation */
.waveform {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
}

.waveform-bar {
    width: 3px;
    background: linear-gradient(180deg, #FF006E, #8338EC);
    border-radius: 2px;
    animation: wave 1s ease-in-out infinite;
}

.waveform-bar:nth-child(1) { animation-delay: 0s; }
.waveform-bar:nth-child(2) { animation-delay: 0.1s; }
.waveform-bar:nth-child(3) { animation-delay: 0.2s; }
.waveform-bar:nth-child(4) { animation-delay: 0.3s; }
.waveform-bar:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
    0%, 100% { height: 8px; }
    50% { height: 20px; }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: #1f2937;
    border: 1px solid #374151;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 0.5rem;
}

.tooltip:hover::before {
    opacity: 1;
}

/* Dark Mode Transition */
.dark-mode-transition {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF006E, #8338EC);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #8338EC, #3A86FF);
}

/* Modal */
.modal-overlay {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    border-radius: 1rem;
    animation: slide-up 0.3s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .sound-card-image {
        height: 160px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-select {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
*:focus-visible {
    outline: 2px solid #FF006E;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #FF006E;
    outline-offset: 2px;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #374151;
    border-top-color: #FF006E;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
