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

::-webkit-scrollbar-track {
    background-color: #111;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

/* Text gradient animation */
.text-gradient {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glow effect on hover */
.hover-glow:hover {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    transition: box-shadow 0.3s ease;
}

/* Futuristic border animation */
.border-pulse {
    position: relative;
    overflow: hidden;
}

.border-pulse::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
    from { background-position: 0% center; }
    to { background-position: 200% center; }
}

/* Custom animations */
.stat-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.3);
}

.player-card:hover .player-card-overlay {
    opacity: 1;
}

/* Cursor trail effect */
.cursor-trail {
    pointer-events: none;
    position: fixed;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.8) 0%, rgba(139, 92, 246, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Floating animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Hero content mask animation */
.hero-mask {
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

/* Page transitions */
.page-transition {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-transition.entering {
    opacity: 0;
    transform: translateY(20px);
}

/* Make specific images responsive */
.responsive-img {
    max-width: 100%;
    height: auto;
}

/* Custom focus states */
input:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Improved card hover states */
.card-hover {
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: inherit;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.3);
}

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

/* Match countdown timer style */
.countdown-timer {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.countdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-size: 24px;
    font-weight: bold;
    color: #3b82f6;
}

.countdown-label {
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
}

/* Hide the default cursor */
body {
    cursor: none;
}

/* Custom cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.3);
    border: 2px solid #3b82f6;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: width 0.2s, height 0.2s, background 0.2s;
    mix-blend-mode: screen;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Cursor states */
.custom-cursor.hover {
    width: 30px;
    height: 30px;
    background: rgba(139, 92, 246, 0.3);
    border-color: #8b5cf6;
}

/* Ensure clickable elements have a pointer cursor indicator */
a, button, input, textarea, select, [role="button"] {
    cursor: none;
}

a:hover ~ .custom-cursor,
button:hover ~ .custom-cursor,
[role="button"]:hover ~ .custom-cursor {
    width: 30px;
    height: 30px;
    background: rgba(139, 92, 246, 0.3);
    border-color: #8b5cf6;
}

/* Loading Screen */
#loading-screen {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.glitch-wrapper {
    position: relative;
    margin: 2rem 0;
}

.glitch {
    font-size: 5rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0.05em 0 0 rgba(0, 255, 252, 0.4),
                -0.03em -0.04em 0 rgba(255, 0, 255, 0.4),
                0.025em 0.04em 0 rgba(255, 252, 0, 0.4);
    animation: glitch 725ms infinite;
}

.glitch-small {
    font-size: 4rem;
    font-weight: bold;
    color: #3b82f6;
    margin-top: -1rem;
    position: relative;
    text-shadow: 0.05em 0 0 rgba(0, 255, 252, 0.4),
                -0.03em -0.04em 0 rgba(255, 0, 255, 0.4),
                0.025em 0.04em 0 rgba(255, 252, 0, 0.4);
    animation: glitch 735ms infinite;
}

.glitch span {
    position: absolute;
    top: 0;
    left: 0;
}

.glitch-small span {
    position: absolute;
    top: 0;
    left: 0;
}

.loading-bar-container {
    width: 200px;
    height: 3px;
    background: rgba(59, 130, 246, 0.2);
    margin: 0 auto;
    border-radius: 3px;
    overflow: hidden;
}

.loading-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    animation: loading 2s ease-in-out forwards;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 rgba(0, 255, 252, 0.4),
                    -0.03em -0.04em 0 rgba(255, 0, 255, 0.4),
                    0.025em 0.04em 0 rgba(255, 252, 0, 0.4);
    }
    15% {
        text-shadow: 0.05em 0 0 rgba(0, 255, 252, 0.4),
                    -0.03em -0.04em 0 rgba(255, 0, 255, 0.4),
                    0.025em 0.04em 0 rgba(255, 252, 0, 0.4);
    }
    16% {
        text-shadow: -0.05em -0.025em 0 rgba(0, 255, 252, 0.4),
                    0.025em 0.035em 0 rgba(255, 0, 255, 0.4),
                    -0.05em -0.05em 0 rgba(255, 252, 0, 0.4);
    }
    49% {
        text-shadow: -0.05em -0.025em 0 rgba(0, 255, 252, 0.4),
                    0.025em 0.035em 0 rgba(255, 0, 255, 0.4),
                    -0.05em -0.05em 0 rgba(255, 252, 0, 0.4);
    }
    50% {
        text-shadow: 0.05em 0.035em 0 rgba(0, 255, 252, 0.4),
                    0.03em 0 0 rgba(255, 0, 255, 0.4),
                    0 -0.04em 0 rgba(255, 252, 0, 0.4);
    }
    99% {
        text-shadow: 0.05em 0.035em 0 rgba(0, 255, 252, 0.4),
                    0.03em 0 0 rgba(255, 0, 255, 0.4),
                    0 -0.04em 0 rgba(255, 252, 0, 0.4);
    }
    100% {
        text-shadow: -0.05em 0 0 rgba(0, 255, 252, 0.4),
                    -0.025em -0.04em 0 rgba(255, 0, 255, 0.4),
                    -0.04em -0.025em 0 rgba(255, 252, 0, 0.4);
    }
}

@keyframes loading {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

.loading-text {
    opacity: 0;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

/* Neon Logo Animation */
.neon-logo {
    animation: pulsate 1.5s infinite alternate;
}

.neon-logo img {
    filter: drop-shadow(0 0 5px #3b82f6) drop-shadow(0 0 10px #3b82f6);
}

/* Neon Text Styles */
.neon-text-container {
    margin: 20px 0;
}

.neon-text {
    font-size: 5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 7px #fff,
                 0 0 10px #fff,
                 0 0 21px #fff,
                 0 0 42px #3b82f6,
                 0 0 82px #3b82f6,
                 0 0 92px #3b82f6,
                 0 0 102px #3b82f6,
                 0 0 151px #3b82f6;
    animation: flicker 1.5s infinite alternate;
}

.neon-number {
    font-size: 4rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 7px #fff,
                 0 0 10px #fff,
                 0 0 21px #fff,
                 0 0 42px #8b5cf6,
                 0 0 82px #8b5cf6,
                 0 0 92px #8b5cf6,
                 0 0 102px #8b5cf6,
                 0 0 151px #8b5cf6;
    animation: flicker 1.5s infinite alternate;
    animation-delay: 0.2s;
}

.neon-text-small {
    font-size: 1rem;
    color: #fff;
    text-shadow: 0 0 7px #fff,
                 0 0 10px #3b82f6,
                 0 0 21px #3b82f6;
    animation: pulsate 1.5s infinite alternate;
}

.neon-tagline {
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 0 7px #fff,
                 0 0 10px #3b82f6,
                 0 0 21px #3b82f6;
    animation: pulsate 1.5s infinite alternate;
    letter-spacing: 2px;
}

/* Animations */
@keyframes flicker {
    0%, 18%, 22%, 25%, 53%, 57%, 100% {
        text-shadow: 0 0 7px #fff,
                    0 0 10px #fff,
                    0 0 21px #fff,
                    0 0 42px #3b82f6,
                    0 0 82px #3b82f6,
                    0 0 92px #3b82f6,
                    0 0 102px #3b82f6,
                    0 0 151px #3b82f6;
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

@keyframes pulsate {
    100% {
        text-shadow: 0 0 4px #fff,
                    0 0 11px #fff,
                    0 0 19px #fff,
                    0 0 40px #3b82f6,
                    0 0 80px #3b82f6,
                    0 0 90px #3b82f6,
                    0 0 100px #3b82f6,
                    0 0 150px #3b82f6;
    }
    0% {
        text-shadow: 0 0 2px #fff,
                    0 0 4px #fff,
                    0 0 6px #fff,
                    0 0 10px #3b82f6,
                    0 0 45px #3b82f6,
                    0 0 55px #3b82f6,
                    0 0 70px #3b82f6,
                    0 0 80px #3b82f6;
    }
}
