/* Custom CSS for InfoStream Nexus */

/* Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0ea5e9, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0284c7, #7c3aed);
}

/* Glassmorphism Utilities */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated Underline */
.animated-underline {
    position: relative;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0ea5e9, #8b5cf6);
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

/* Pulse Animation for Live Indicators */
.live-pulse {
    position: relative;
}

.live-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: livePulse 2s ease-out infinite;
}

@keyframes livePulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

/* Skeleton Loading Shimmer */
.skeleton-shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* Tag Styles */
.tag-ai {
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    color: #1e40af;
}

.tag-science {
    background: linear-gradient(135deg, #d1fae5 0%, #ccfbf1 100%);
    color: #065f46;
}

.tag-tech {
    background: linear-gradient(135deg, #fef3c7 0%, #ffedd5 100%);
    color: #92400e;
}

.tag-nhl {
    background: linear-gradient(135deg, #fee2e2 0%, #fed7aa 100%);
    color: #9a3412;
}

/* News Card Image Overlay */
.card-image-overlay {
    position: relative;
    overflow: hidden;
}

.card-image-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-image-overlay:hover::after {
    opacity: 1;
}

/* Badge Styles */
.badge-priority-high {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.badge-priority-medium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.badge-priority-low {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* McDavid Theme Colors */
.oilers-orange {
    color: #f47920;
}

.oilers-blue {
    color: #041e42;
}

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

/* Floating Elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

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

/* Grid Pattern Background */
.grid-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.1) 1px, transparent 0);
    background-size: 40px 40px;
}

/* Custom Focus Styles */
.focus-ring:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
}

/* Topic Filter Pill */
.filter-pill {
    transition: all 0.2s ease;
}

.filter-pill.active {
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    color: white;
    transform: scale(1.05);
}

/* News Source Badge */
.source-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Reading Time Badge */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar-mobile-hidden {
        transform: translateX(-100%);
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Selection Color */
::selection {
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
    color: white;
}

/* Loading State Animations */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin-slow {
    animation: spin-slow 3s linear infinite;
}

/* Card Gradient Borders */
.card-gradient-border {
    position: relative;
    background: white;
    border-radius: 1rem;
}

.card-gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #0ea5e9, #8b5cf6, #f43f5e);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

/* Navigation Hover Effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}