/* Waves Untangled - Global Styles */

/* Material Symbols Outlined Configuration */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
    background: #13a4ec;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0f8ac9;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus-visible {
    outline: 2px solid #13a4ec;
    outline-offset: 2px;
}

/* Transitions */
a, button {
    transition: all 0.3s ease;
}

/* Hide scrollbar for horizontal scroll containers */
.overflow-x-auto::-webkit-scrollbar {
    height: 6px;
}

/* Custom animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Mobile menu styles */
#mobileMenu {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobileMenu.hidden {
    transform: translateX(100%);
    opacity: 0;
}

/* Image loading placeholder */
.bg-cover, .bg-center {
    background-color: rgba(0, 0, 0, 0.1);
}

.dark .bg-cover, .dark .bg-center {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Form input focus styles */
input:focus, textarea:focus, select:focus {
    border-color: #13a4ec;
    ring-color: rgba(19, 164, 236, 0.5);
}

/* Button hover effects */
button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Card hover effects */
.group:hover {
    transform: translateY(-2px);
}

/* Prevent text selection on buttons */
button {
    user-select: none;
    -webkit-user-select: none;
}

/* Utility classes */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(19, 164, 236, 0.3);
    border-top-color: #13a4ec;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Music Player Animations */
@keyframes slideUpFromBottom {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes slideDownToBottom {
    from {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    to {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
}

#musicPlayer {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#musicPlayer.slide-in {
    animation: slideUpFromBottom 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

#musicPlayer.slide-out {
    animation: slideDownToBottom 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* For minimized player (left position) */
#musicPlayer.minimized {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s ease;
}

#musicPlayer.minimized.slide-in {
    animation: none;
}

#musicPlayer.minimized.slide-out {
    animation: none;
}

/* Song Counter Styles */
.song-counter-box {
    width: 200px; /* Fixed width */
    padding: 1rem; /* Adjusted padding */
}

#song-count {
    transition: all 0.3s ease;
    text-shadow: 0 0 15px rgba(168, 85, 247, 0.5);
}

/* Modal Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.95) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modalSlideOut {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    to {
        transform: scale(0.95) translateY(-20px);
        opacity: 0;
    }
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.modal-overlay {
    animation: modalFadeIn 0.2s ease-out;
}

.modal-overlay.closing {
    animation: modalFadeOut 0.2s ease-out;
}

.modal-content {
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.closing .modal-content {
    animation: modalSlideOut 0.2s ease-out;
}

.progress-line {
    animation: progressBar 5s linear;
    width: 100%;
}

/* Mobile Player Zoom */
@media (max-width: 640px) {
    #musicPlayer {
        transform-origin: bottom center;
    }

    @keyframes slideUpFromBottomMobile {
        from {
            transform: translate(-50%, 100%) scale(0.75);
            opacity: 0;
        }
        to {
            transform: translate(-50%, 0) scale(0.75);
            opacity: 1;
        }
    }

    @keyframes slideDownToBottomMobile {
        from {
            transform: translate(-50%, 0) scale(0.75);
            opacity: 1;
        }
        to {
            transform: translate(-50%, 100%) scale(0.75);
            opacity: 0;
        }
    }

    #musicPlayer.slide-in {
        animation-name: slideUpFromBottomMobile;
    }

    #musicPlayer.slide-out {
        animation-name: slideDownToBottomMobile;
    }

    /* Handle minimized state on mobile */
    #musicPlayer.minimized {
        transform: scale(0.75);
        transform-origin: bottom left;
    }
}
