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

::-webkit-scrollbar-track {
    background: #07160e;
}

::-webkit-scrollbar-thumb {
    background: #2edc8c;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #42f0a0;
}

/* Glass effect */
.glass {
    background: rgba(11, 31, 22, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(46, 220, 140, 0.05);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(90deg, #2edc8c, #42f0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Shiny effect for cards */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: transform 0.5s;
    z-index: 1;
    pointer-events: none;
}

.shine-effect:hover::after {
    transform: rotate(30deg) translate(50%, 50%);
}

/* Wheel of Fortune */
.wheel-container {
    position: relative;
    width: 350px;
    height: 350px;
    margin: 0 auto;
}

.wheel {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 5s cubic-bezier(0.1, 0.05, 0.15, 1);
    transform: rotate(0deg);
    background: conic-gradient(
        #2edc8c 0deg 45deg,
        #42f0a0 45deg 90deg,
        #f5c451 90deg 135deg,
        #2edc8c 135deg 180deg,
        #ff5b6b 180deg 225deg,
        #f5c451 225deg 270deg,
        #42f0a0 270deg 315deg,
        #2edc8c 315deg 360deg
    );
    box-shadow: 0 0 20px rgba(46, 220, 140, 0.6);
}

.wheel-center {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #07160e;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border: 3px solid rgba(46, 220, 140, 0.1);
    cursor: pointer;
}

.wheel-marker {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 40px;
    background: #f5c451;
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 11;
}

.wheel-item {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    width: 50%;
    height: 1px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 40px;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

/* Live feed animation */
@keyframes slidein {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

.live-feed {
    animation: slidein 20s linear infinite;
}

/* Confetti animation */
@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(720deg); }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: #2edc8c;
    animation: confetti-fall 5s linear forwards;
    z-index: 9999;
}

/* Activity card animation */
@keyframes slide-in {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

.slide-in {
    animation: slide-in 0.5s ease-out forwards;
}

/* XP Bar animation */
@keyframes fill-bar {
    0% { width: 0%; }
    100% { width: var(--progress-width); }
}

.xp-progress {
    animation: fill-bar 1.5s ease-out forwards;
}

/* Leaderboard highlight animation */
@keyframes highlight-row {
    0%, 100% { background-color: rgba(46, 220, 140, 0.2); }
    50% { background-color: rgba(46, 220, 140, 0.4); }
}

.highlight-row {
    animation: highlight-row 2s ease-in-out infinite;
}

/* Badge unlock animation */
@keyframes badge-unlock {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

.badge-unlock {
    animation: badge-unlock 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Notification badge pulse */
@keyframes notification-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.notification-pulse {
    animation: notification-pulse 1s infinite;
}

/* Animate carousel */
.animate-carousel {
    display: flex;
    animation: auto-scroll 30s linear infinite;
}

@keyframes auto-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Custom Tailwind Utilities */
@layer utilities {
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .glow {
        filter: drop-shadow(0 0 5px rgba(46, 220, 140, 0.5));
    }

    .rotate-y-180 {
        transform: rotateY(180deg);
    }

    .preserve-3d {
        transform-style: preserve-3d;
    }

    .perspective {
        perspective: 1000px;
    }
}
