| | |
| |
|
| | |
| | .lazy-image { |
| | opacity: 0; |
| | transition: opacity 0.3s ease; |
| | background-color: #f0f0f0; |
| | background-size: cover; |
| | background-position: center; |
| | background-repeat: no-repeat; |
| | } |
| |
|
| | .lazy-image.loaded { |
| | opacity: 1; |
| | } |
| |
|
| | .lazy-image.loading { |
| | background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgZmlsbD0iI2YwZjBmMCIvPjx0ZXh0IHg9IjUwJSIgeT0iNTAlIiBkeD0iMCUiZmlsbD0idXJsKCNjMDAwMDAwKSIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzMzMzMzMyIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPuaIkOWbvueJhzwvdGV4dD48L3N2Zz4='); |
| | } |
| |
|
| | .lazy-image.error { |
| | background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgZmlsbD0iI2ZmZiIvPjx0ZXh0IHg9IjUwJSIgeT0iNTAlIiBkeD0iMCUiZmlsbD0idXJsKCNjMDAwMDAwKSIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzMzMzMzMyIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPlVubGljZS1EZXNjcmlwdGlvbi1BZHZhbmNlZCAtLTwvdGV4dD48L3N2Zz4='); |
| | } |
| |
|
| | |
| | .lazy-component { |
| | opacity: 0; |
| | transform: translateY(20px); |
| | transition: opacity 0.3s ease, transform 0.3s ease; |
| | } |
| |
|
| | .lazy-component.loaded { |
| | opacity: 1; |
| | transform: translateY(0); |
| | } |
| |
|
| | .lazy-component.loading { |
| | min-height: 200px; |
| | background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); |
| | background-size: 200% 100%; |
| | animation: lazyLoading 1.5s infinite; |
| | } |
| |
|
| | @keyframes lazyLoading { |
| | 0% { |
| | background-position: 200% 0; |
| | } |
| | 100% { |
| | background-position: -200% 0; |
| | } |
| | } |
| |
|
| | |
| | .lazy-background { |
| | background-color: #f8f9fa; |
| | background-size: cover; |
| | background-position: center; |
| | background-repeat: no-repeat; |
| | transition: background-image 0.3s ease; |
| | } |
| |
|
| | .lazy-background.loaded { |
| | background-image: var(--lazy-bg-image); |
| | } |
| |
|
| | |
| | .lazy-video { |
| | opacity: 0; |
| | transition: opacity 0.3s ease; |
| | } |
| |
|
| | .lazy-video.loaded { |
| | opacity: 1; |
| | } |
| |
|
| | .lazy-video video { |
| | width: 100%; |
| | height: 100%; |
| | object-fit: cover; |
| | } |
| |
|
| | |
| | .lazy-iframe { |
| | opacity: 0; |
| | transition: opacity 0.3s ease; |
| | } |
| |
|
| | .lazy-iframe.loaded { |
| | opacity: 1; |
| | } |
| |
|
| | .lazy-iframe iframe { |
| | width: 100%; |
| | height: 100%; |
| | border: none; |
| | } |
| |
|
| | |
| | .no-intersection-observer .lazy-image, |
| | .no-intersection-observer .lazy-component, |
| | .no-intersection-observer .lazy-background, |
| | .no-intersection-observer .lazy-video, |
| | .no-intersection-observer .lazy-iframe { |
| | opacity: 1; |
| | transform: none; |
| | } |
| |
|
| | |
| | .loading-skeleton { |
| | background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); |
| | background-size: 200% 100%; |
| | animation: loadingSkeleton 1.5s infinite; |
| | } |
| |
|
| | @keyframes loadingSkeleton { |
| | 0% { |
| | background-position: 200% 0; |
| | } |
| | 100% { |
| | background-position: -200% 0; |
| | } |
| | } |
| |
|
| | .loading-pulse { |
| | animation: loadingPulse 1.5s ease-in-out infinite; |
| | } |
| |
|
| | @keyframes loadingPulse { |
| | 0%, 100% { |
| | opacity: 1; |
| | } |
| | 50% { |
| | opacity: 0.5; |
| | } |
| | } |
| |
|
| | .loading-spinner { |
| | border: 3px solid #f3f3f3; |
| | border-top: 3px solid var(--primary-color); |
| | border-radius: 50%; |
| | width: 40px; |
| | height: 40px; |
| | animation: loadingSpin 1s linear infinite; |
| | } |
| |
|
| | @keyframes loadingSpin { |
| | 0% { |
| | transform: rotate(0deg); |
| | } |
| | 100% { |
| | transform: rotate(360deg); |
| | } |
| | } |
| |
|
| | |
| | .progressive-image { |
| | opacity: 0; |
| | transition: opacity 0.3s ease; |
| | } |
| |
|
| | .progressive-image.loaded-low { |
| | opacity: 0.5; |
| | } |
| |
|
| | .progressive-image.loaded-high { |
| | opacity: 1; |
| | } |
| |
|
| | |
| | .placeholder-avatar { |
| | background: linear-gradient(45deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%); |
| | background-size: 200% 200%; |
| | animation: placeholderAnimation 1.5s ease infinite; |
| | } |
| |
|
| | @keyframes placeholderAnimation { |
| | 0% { |
| | background-position: 0% 50%; |
| | } |
| | 50% { |
| | background-position: 100% 50%; |
| | } |
| | 100% { |
| | background-position: 0% 50%; |
| | } |
| | } |
| |
|
| | .placeholder-card { |
| | background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); |
| | background-size: 200% 100%; |
| | animation: placeholderAnimation 1.5s ease infinite; |
| | } |
| |
|
| | |
| | .error-state { |
| | background: #fff5f5; |
| | border: 1px solid #fed7d7; |
| | border-radius: 8px; |
| | padding: 16px; |
| | text-align: center; |
| | color: #c53030; |
| | } |
| |
|
| | .error-state svg { |
| | width: 48px; |
| | height: 48px; |
| | margin-bottom: 8px; |
| | color: #c53030; |
| | } |
| |
|
| | |
| | .retry-button { |
| | background: var(--primary-color); |
| | color: white; |
| | border: none; |
| | padding: 8px 16px; |
| | border-radius: 4px; |
| | cursor: pointer; |
| | font-size: 14px; |
| | margin-top: 8px; |
| | transition: background 0.2s ease; |
| | } |
| |
|
| | .retry-button:hover { |
| | background: var(--primary-color-dark); |
| | } |
| |
|
| | .retry-button:focus { |
| | outline: 2px solid var(--primary-color); |
| | outline-offset: 2px; |
| | } |
| |
|
| | |
| | .performance-indicator { |
| | position: fixed; |
| | top: 10px; |
| | right: 10px; |
| | background: rgba(0, 0, 0, 0.8); |
| | color: white; |
| | padding: 8px 12px; |
| | border-radius: 4px; |
| | font-size: 12px; |
| | font-family: monospace; |
| | z-index: 9999; |
| | } |
| |
|
| | .performance-indicator.good { |
| | background: rgba(34, 197, 94, 0.8); |
| | } |
| |
|
| | .performance-indicator.warning { |
| | background: rgba(251, 191, 36, 0.8); |
| | } |
| |
|
| | .performance-indicator.poor { |
| | background: rgba(239, 68, 68, 0.8); |
| | } |
| |
|
| | |
| | .lazy-load-threshold-0 { |
| | opacity: 0; |
| | transition: opacity 0.3s ease; |
| | } |
| |
|
| | .lazy-load-threshold-0.loaded { |
| | opacity: 1; |
| | } |
| |
|
| | .lazy-load-threshold-100 { |
| | opacity: 0; |
| | transition: opacity 0.3s ease; |
| | } |
| |
|
| | .lazy-load-threshold-100.loaded { |
| | opacity: 1; |
| | } |
| |
|
| | .lazy-load-threshold-200 { |
| | opacity: 0; |
| | transition: opacity 0.3s ease; |
| | } |
| |
|
| | .lazy-load-threshold-200.loaded { |
| | opacity: 1; |
| | } |
| |
|
| | .lazy-load-threshold-300 { |
| | opacity: 0; |
| | transition: opacity 0.3s ease; |
| | } |
| |
|
| | .lazy-load-threshold-300.loaded { |
| | opacity: 1; |
| | } |
| |
|
| | |
| | @media (max-width: 767px) { |
| | .mobile-lazy-image { |
| | opacity: 0; |
| | transition: opacity 0.5s ease; |
| | } |
| | |
| | .mobile-lazy-image.loaded { |
| | opacity: 1; |
| | } |
| | |
| | .mobile-lazy-component { |
| | opacity: 0; |
| | transform: translateY(30px); |
| | transition: opacity 0.5s ease, transform 0.5s ease; |
| | } |
| | |
| | .mobile-lazy-component.loaded { |
| | opacity: 1; |
| | transform: translateY(0); |
| | } |
| | } |
| |
|
| | |
| | @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { |
| | .lazy-image.high-dpi { |
| | image-rendering: -webkit-optimize-contrast; |
| | image-rendering: crisp-edges; |
| | } |
| | } |
| |
|
| | |
| | @media (prefers-reduced-data: reduce) { |
| | .lazy-image.low-data { |
| | display: none; |
| | } |
| | |
| | .lazy-placeholder.low-data { |
| | display: block; |
| | } |
| | } |
| |
|
| | |
| | @media (prefers-reduced-motion: reduce) { |
| | .lazy-image, |
| | .lazy-component, |
| | .lazy-background, |
| | .lazy-video, |
| | .lazy-iframe { |
| | transition: none; |
| | } |
| | |
| | .loading-skeleton, |
| | .loading-pulse, |
| | .placeholder-avatar, |
| | .placeholder-card { |
| | animation: none; |
| | } |
| | } |
| |
|
| | |
| | @media print { |
| | .lazy-image, |
| | .lazy-video, |
| | .lazy-iframe { |
| | opacity: 1 !important; |
| | transform: none !important; |
| | } |
| | |
| | .loading-skeleton, |
| | .loading-pulse, |
| | .loading-spinner { |
| | display: none !important; |
| | } |
| | } |