/**
 * Loading Skeleton Animations
 * Modern loading placeholders
 */

/* Skeleton Base */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.1) 25%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

.skeleton-light {
    background: linear-gradient(90deg,
            #f0f0f0 25%,
            #e0e0e0 50%,
            #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 8px;
}

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

    100% {
        background-position: -200% 0;
    }
}

/* Skeleton Elements */
.skeleton-text {
    height: 16px;
    width: 100%;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 12px;
}

.skeleton-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
}

.skeleton-card {
    padding: 20px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* Skeleton Card Match */
.skeleton-match-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-match-card .skeleton-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.skeleton-match-card .skeleton-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-match-card .skeleton-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.skeleton-match-card .skeleton-score {
    width: 60px;
    height: 30px;
}

/* Preloader */
.page-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    color: #fff;
}

.preloader-logo {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, #ffc107 0%, #28a745 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #ffc107;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.preloader-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Lazy Load Placeholder */
.lazy-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.lazy-placeholder i {
    font-size: 2rem;
    color: #ccc;
}

/* Image lazy load animation */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[data-src].loaded {
    opacity: 1;
}

/* Content fade in */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation */
.stagger-animation>* {
    opacity: 0;
    transform: translateY(20px);
    animation: stagger-fade-in 0.5s ease forwards;
}

.stagger-animation>*:nth-child(1) {
    animation-delay: 0.1s;
}

.stagger-animation>*:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation>*:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation>*:nth-child(4) {
    animation-delay: 0.4s;
}

.stagger-animation>*:nth-child(5) {
    animation-delay: 0.5s;
}

.stagger-animation>*:nth-child(6) {
    animation-delay: 0.6s;
}

@keyframes stagger-fade-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button hover effects */
.btn-hover-lift {
    transition: all 0.3s ease;
}

.btn-hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-hover-glow {
    transition: all 0.3s ease;
}

.btn-hover-glow:hover {
    box-shadow: 0 0 20px currentColor;
}

/* Card hover effects */
.card-hover-zoom {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.card-hover-zoom:hover {
    transform: scale(1.03);
}

.card-hover-zoom img {
    transition: transform 0.4s ease;
}

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

/* Ripple effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10.01%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10, 10);
    opacity: 0;
    transition: transform 0.5s, opacity 1s;
}

.ripple:active::after {
    transform: scale(0, 0);
    opacity: 0.3;
    transition: 0s;
}

/* Progress bar */
.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #ffc107 0%, #28a745 100%);
    z-index: 10000;
    transition: width 0.2s ease;
}

/* Dark mode overrides */
.dark-mode .skeleton-light {
    background: linear-gradient(90deg,
            #2a2a2a 25%,
            #333 50%,
            #2a2a2a 75%);
    background-size: 200% 100%;
}

.dark-mode .skeleton-card {
    background: #1e1e1e;
}

.dark-mode .lazy-placeholder {
    background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
}

/* Responsive skeleton */
@media (max-width: 768px) {
    .skeleton-image {
        height: 150px;
    }

    .preloader-logo {
        font-size: 1.5rem;
    }
}