/* HolyStream - Custom Styles */

/* Scrollbar Hide */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Custom Scrollbar for Main Content */
#main-content::-webkit-scrollbar {
    width: 12px;
}

#main-content::-webkit-scrollbar-track {
    background: transparent;
}

#main-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    border: 3px solid #121212;
}

#main-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Card Styles */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

.card-hover:hover .play-overlay {
    opacity: 1;
    transform: translateY(0);
}

.play-overlay {
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Progress Bar */
#progress-bar-container:hover #progress-bar {
    background-color: #22c55e;
}

/* Volume Bar */
#volume-container:hover #volume-bar {
    background-color: #22c55e;
}

/* Page Transitions */
.page {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page.active {
    opacity: 1;
    transform: translateY(0);
}

/* Table Row Hover */
.song-row {
    transition: background-color 0.2s ease;
}

.song-row:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.song-row:hover .song-number {
    opacity: 0;
}

.song-row:hover .play-icon {
    opacity: 1;
}

.song-number {
    transition: opacity 0.2s ease;
}

.play-icon {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Audio Visualizer Animation */
@keyframes pulse-wave {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.wave-bar {
    animation: pulse-wave 1s ease-in-out infinite;
    transform-origin: bottom;
}

.wave-bar:nth-child(2) { animation-delay: 0.1s; }
.wave-bar:nth-child(3) { animation-delay: 0.2s; }
.wave-bar:nth-child(4) { animation-delay: 0.3s; }

/* Category Card Gradients */
.category-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-card::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    border-radius: 50%;
    transform: rotate(45deg);
}

.category-card:hover {
    transform: scale(1.02);
}

/* Mood Playlist Card */
.mood-card {
    transition: all 0.3s ease;
}

.mood-card:hover {
    transform: scale(1.02);
}

/* Toast Animation */
#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Mobile Sidebar */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 40;
        transform: translateX(-100%);
    }
    
    #sidebar.open {
        transform: translateX(0);
    }
    
    #sidebar-overlay {
        display: none;
    }
    
    #sidebar-overlay.show {
        display: block;
    }
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

/* Artist Card */
.artist-card img {
    transition: all 0.3s ease;
}

.artist-card:hover img {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Album Card */
.album-card .album-cover {
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.album-card:hover .album-cover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* Playlist Card */
.playlist-card .playlist-cover {
    transition: all 0.3s ease;
}

/* Button Active States */
button:active {
    transform: scale(0.95);
}

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

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

/* Mini Player for Mobile */
@media (max-width: 640px) {
    #player-bar {
        height: auto;
        padding: 8px 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    #player-bar > div {
        width: 100% !important;
    }
    
    #player-bar .flex-1.w-full {
        order: -1;
    }
}

/* Search Input Focus */
#search-input:focus {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Radio Wave Animation */
@keyframes radio-wave {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

.radio-wave {
    position: absolute;
    border-radius: 50%;
    border: 2px solid #22c55e;
    animation: radio-wave 2s ease-out infinite;
}

/* Sticky Section Header */
.sticky-header {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Scroll-driven opacity for top bar */
.top-bar-scrolled {
    background: rgba(18, 18, 18, 0.95);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Custom Selection */
::selection {
    background: rgba(34, 197, 94, 0.3);
    color: white;
}

/* Range Input Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    margin-top: -4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

input[type="range"]:hover::-webkit-slider-thumb {
    background: #22c55e;
    transform: scale(1.2);
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #22c55e;
    outline-offset: 2px;
}

/* Playing Indicator */
.playing-indicator {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
}

.playing-indicator .bar {
    width: 3px;
    background: #22c55e;
    border-radius: 2px;
    animation: playing-bar 0.5s ease-in-out infinite alternate;
}

.playing-indicator .bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.playing-indicator .bar:nth-child(2) { height: 80%; animation-delay: 0.1s; }
.playing-indicator .bar:nth-child(3) { height: 60%; animation-delay: 0.2s; }
.playing-indicator .bar:nth-child(4) { height: 100%; animation-delay: 0.15s; }

@keyframes playing-bar {
    from { transform: scaleY(0.3); }
    to { transform: scaleY(1); }
}

/* Responsive Grid */
@media (max-width: 640px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Hero Gradient Animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

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

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    padding: 4px 8px;
    background: #282828;
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

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

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Lazy Load Image */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img.loaded {
    opacity: 1;
}

/* Horizontal Scroll Container */
.horizontal-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.horizontal-scroll > * {
    scroll-snap-align: start;
    flex-shrink: 0;
}
