/* Portfolio Specific Styles */

/* Scrollbar hiding for slider */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Genre Button Styles */
.genre-btn {
    position: relative;
    overflow: hidden;
}

.genre-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.genre-btn:hover::before {
    left: 100%;
}

.genre-btn.active {
    background: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
    transform: scale(1.05);
}

.genre-btn.active:hover {
    background: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
    transform: scale(1.05);
}

.dark .genre-btn.active {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.dark .genre-btn.active:hover {
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Scroll Button Styles */
#scroll-left, #scroll-right {
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 40px;
    height: 40px;
}

#scroll-left:hover, #scroll-right:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Hide scroll buttons when at start/end - remove space */
#scroll-left.hidden-at-start,
#scroll-right.hidden-at-end {
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Show scroll buttons only when content overflows */
#genre-slider-container.scrollable #scroll-left:not(.hidden-at-start),
#genre-slider-container.scrollable #scroll-right:not(.hidden-at-end) {
    opacity: 1;
    pointer-events: auto;
    width: 40px;
    height: 40px;
}

/* Fade gradients for disappearing elements */
#genre-slider {
    position: relative;
}

#genre-slider::before,
#genre-slider::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
    opacity: var(--left-gradient-opacity, 0);
}

#genre-slider::after {
    opacity: var(--right-gradient-opacity, 0);
}

#genre-slider::before {
    left: 0;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.3) 60%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent 100%
    );
}

#genre-slider::after {
    right: 0;
    background: linear-gradient(to left, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.3) 60%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent 100%
    );
}

/* Dark mode gradients */
.dark #genre-slider::before {
    background: linear-gradient(to right, 
        rgba(17, 24, 39, 0.8) 0%,
        rgba(17, 24, 39, 0.6) 30%,
        rgba(17, 24, 39, 0.3) 60%,
        rgba(17, 24, 39, 0.1) 80%,
        transparent 100%
    );
}

.dark #genre-slider::after {
    background: linear-gradient(to left, 
        rgba(17, 24, 39, 0.8) 0%,
        rgba(17, 24, 39, 0.6) 30%,
        rgba(17, 24, 39, 0.3) 60%,
        rgba(17, 24, 39, 0.1) 80%,
        transparent 100%
    );
}

/* Fade gradients for disappearing elements */
#genre-slider {
    position: relative;
}

#genre-slider::before,
#genre-slider::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
    opacity: var(--left-gradient-opacity, 0);
}

#genre-slider::after {
    opacity: var(--right-gradient-opacity, 0);
}

#genre-slider::before {
    left: 0;
    background: linear-gradient(to right, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.3) 60%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent 100%
    );
}

#genre-slider::after {
    right: 0;
    background: linear-gradient(to left, 
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0.6) 30%,
        rgba(255, 255, 255, 0.3) 60%,
        rgba(255, 255, 255, 0.1) 80%,
        transparent 100%
    );
    opacity: var(--right-gradient-opacity, 0);
}

/* Dark mode gradients */
.dark #genre-slider::before {
    background: linear-gradient(to right, 
        rgba(17, 24, 39, 0.8) 0%,
        rgba(17, 24, 39, 0.6) 30%,
        rgba(17, 24, 39, 0.3) 60%,
        rgba(17, 24, 39, 0.1) 80%,
        transparent 100%
    );
}

.dark #genre-slider::after {
    background: linear-gradient(to left, 
        rgba(17, 24, 39, 0.8) 0%,
        rgba(17, 24, 39, 0.6) 30%,
        rgba(17, 24, 39, 0.3) 60%,
        rgba(17, 24, 39, 0.1) 80%,
        transparent 100%
    );
}

/* Active Genre Indicator */
#active-genre-text {
    transition: all 0.3s ease;
    pointer-events: auto;
    width: 40px;
    height: 40px;
}

/* Category Section Transitions */
.category-section {
    transition: all 0.5s ease;
}

.category-section.hidden {
    opacity: 0;
    transform: translateY(20px);
    display: none;
}

.category-section.visible {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

/* Filter Button Styles */
.filter-btn {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.filter-btn:hover {
    background-color: #e5e7eb;
    color: #374151;
    transform: translateY(-1px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.dark .filter-btn {
    background-color: #374151;
    color: #d1d5db;
}

.dark .filter-btn:hover {
    background-color: #4b5563;
    color: #f3f4f6;
}

.dark .filter-btn.active {
    background: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Project Card Styles */
.project-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(229, 231, 235, 0.5);
}

.dark .project-card {
    border-color: rgba(55, 65, 81, 0.5);
}

.project-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.project-card img {
    transition: transform 0.3s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

/* Category Badge Styles */
.project-card .bg-primary\/10 {
    background-color: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

.dark .project-card .bg-primary\/10 {
    background-color: rgba(6, 182, 212, 0.2);
    color: #22d3ee;
}

/* Animation Classes */
/* Text Glow Animation */
@keyframes textGlow {
    0%, 100% {
        text-shadow: 
            0 0 10px rgba(6, 182, 212, 0.8),
            0 0 20px rgba(6, 182, 212, 0.6),
            0 0 30px rgba(6, 182, 212, 0.4),
            0 0 40px rgba(6, 182, 212, 0.2);
    }
    50% {
        text-shadow: 
            0 0 15px rgba(139, 92, 246, 0.8),
            0 0 25px rgba(139, 92, 246, 0.6),
            0 0 35px rgba(139, 92, 246, 0.4),
            0 0 45px rgba(139, 92, 246, 0.2);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.card-enter {
    animation: fadeIn 0.5s ease-out forwards;
}

.card-exit {
    animation: fadeOut 0.3s ease-out forwards;
}

/* Fade Effects */
.fade-effect {
    transition: opacity 0.3s ease-out;
}

.fade-effect.fade-in {
    opacity: 1;
}

.fade-effect.fade-out {
    opacity: 0;
}

/* Glow Effects */
.glow-effect {
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.3);
}

.dark .glow-effect {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
}

/* Text Gradient */
.gradient-text {
    background: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 3s ease-in-out infinite;
}

/* Line Clamp for Description */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
    box-orient: vertical;
}

/* Loading State */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading 1.5s infinite;
}

.dark .loading::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

@keyframes loading {
    to {
        left: 100%;
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    .text-4xl {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .text-5xl {
        font-size: 3rem;
        line-height: 1.2;
    }
    
    .text-6xl {
        font-size: 3.5rem;
        line-height: 1.1;
    }
}

/* Scrollbar Styling */
.filter-tabs::-webkit-scrollbar {
    height: 6px;
}

.filter-tabs::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.filter-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.filter-tabs::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.dark .filter-tabs::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark .filter-tabs::-webkit-scrollbar-thumb {
    background: #475569;
}

.dark .filter-tabs::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Hover Effects for Links */
.project-card a {
    position: relative;
    transition: all 0.3s ease;
}

.project-card a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #06B6D4 0%, #8B5CF6 100%);
    transition: width 0.3s ease;
}

.project-card a:hover::after {
    width: 100%;
}

/* Backdrop Blur Effects */
.backdrop-blur-lg {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* Custom Shadows */
.shadow-glow {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
}

.dark .shadow-glow {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

/* Smooth Transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Focus States */
.filter-btn:focus,
.project-card a:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.filter-btn:focus-visible,
.project-card a:focus-visible {
    outline: 2px solid #06B6D4;
    outline-offset: 2px;
}

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

/* Print Styles */
@media print {
    .filter-tabs,
    #mobile-menu-button,
    #theme-toggle,
    #mobile-theme-toggle {
        display: none !important;
    }
    
    .project-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
}
