@tailwind base;
@tailwind components;
@tailwind utilities;

/* =============================================================================
   CUSTOM SCROLLBAR
   ============================================================================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #2a2a2a;
}

::-webkit-scrollbar-thumb {
    background: #ff6b00;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e55a00;
}

/* =============================================================================
   UTILITY CLASSES
   ============================================================================= */

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hover effects */
.hover-scale {
    transition: transform 0.2s ease;
}

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

/* Video thumbnail overlay */
.video-overlay {
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, transparent 50%);
}

/* =============================================================================
   CUSTOM COMPONENTS
   ============================================================================= */
@layer components {
    .tube-container {
        @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8;
    }
    
    .tube-card {
        @apply bg-white rounded-lg overflow-hidden shadow-lg hover:shadow-xl transition-shadow duration-300;
    }
    
    .tube-btn {
        @apply inline-flex items-center justify-center px-6 py-3 rounded-lg font-semibold text-white transition-all duration-200;
    }
    
    .tube-btn:hover {
        transform: translateY(-1px);
    }
    
    .tube-btn-primary {
        @apply tube-btn bg-tube-orange hover:bg-orange-600;
    }
    
    .tube-btn-secondary {
        @apply tube-btn bg-gray-600 hover:bg-gray-700;
    }
    
    .tube-video-card {
        @apply tube-card group cursor-pointer;
    }
    
    .tube-video-thumbnail {
        @apply aspect-video bg-gray-900 relative overflow-hidden;
    }
    
    .tube-video-info {
        @apply p-4;
    }
    
    .tube-video-title {
        @apply font-semibold text-gray-900 line-clamp-2 mb-2;
    }
    
    .tube-video-meta {
        @apply text-sm text-gray-600 space-y-1;
    }
    
    .tube-model-badge {
        @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-tube-orange text-white;
    }
    
    .tube-stats {
        @apply flex items-center space-x-4 text-sm text-gray-500;
    }
    
    /* Navigation styles */
    .nav-link {
        @apply text-gray-300 hover:text-tube-orange transition-colors duration-200;
    }
    
    .nav-link.active {
        @apply text-tube-orange;
    }
}

/* =============================================================================
   DARK THEME OPTIMIZATIONS
   ============================================================================= */
.dark {
    @apply bg-tube-dark text-white;
}

.dark .tube-card {
    @apply bg-tube-gray border-tube-light-gray;
}

.dark .tube-video-title {
    @apply text-white;
}

.dark .tube-video-meta {
    @apply text-gray-400;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

/* Mobile optimizations */
@media (max-width: 640px) {
    .tube-container {
        @apply px-2;
    }
    
    .tube-btn {
        @apply px-4 py-2 text-sm;
    }
}

/* Tablet optimizations */
@media (min-width: 641px) and (max-width: 1024px) {
    .tube-video-card {
        @apply hover:scale-105 transition-transform duration-200;
    }
}

/* Desktop optimizations */
@media (min-width: 1025px) {
    .hover-scale:hover {
        transform: scale(1.05);
    }
}

/* =============================================================================
   ANIMATIONS & TRANSITIONS
   ============================================================================= */

/* Loading animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

/* Fade in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Smooth transitions for all interactive elements */
.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =============================================================================
   CUSTOM UTILITIES (Additional)
   ============================================================================= */
@layer utilities {
    /* Glass morphism effect */
    .glass {
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    /* Gradient text */
    .text-gradient {
        background: linear-gradient(45deg, #ff6b00, #ff8f40);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    /* Shadow variations */
    .shadow-tube {
        box-shadow: 0 4px 6px -1px rgba(255, 107, 0, 0.1), 0 2px 4px -1px rgba(255, 107, 0, 0.06);
    }
    
    .shadow-tube-lg {
        box-shadow: 0 10px 15px -3px rgba(255, 107, 0, 0.1), 0 4px 6px -2px rgba(255, 107, 0, 0.05);
    }
    
    /* Focus states */
    .focus-tube {
        @apply focus:outline-none focus:ring-2 focus:ring-tube-orange focus:ring-opacity-50;
    }
}