/* ==========================================================================
   BruhRewards x Roobet Premium Styling System
   ========================================================================== */

body {
    font-family: 'Space Grotesk', sans-serif;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    overflow-x: hidden;
}

/* Glassmorphism utility */
.glass-card {
    background: rgba(26, 26, 29, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.glass-card:hover {
    border-color: rgba(37, 175, 244, 0.25);
}

.glass-card-hover:hover {
    background: rgba(37, 175, 244, 0.06);
    border-color: rgba(37, 175, 244, 0.35);
}

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

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

/* Modern High-Performance Keyframe Animations */
@keyframes aurora-spin-1 {
    0% {
        transform: translate3d(0, 0, 0) scale(1) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translate3d(6vw, 4vh, 0) scale(1.15) rotate(180deg);
        opacity: 0.95;
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1) rotate(360deg);
        opacity: 0.7;
    }
}

@keyframes aurora-spin-2 {
    0% {
        transform: translate3d(0, 0, 0) scale(1.05) rotate(360deg);
        opacity: 0.6;
    }
    50% {
        transform: translate3d(-5vw, -6vh, 0) scale(0.92) rotate(180deg);
        opacity: 0.85;
    }
    100% {
        transform: translate3d(0, 0, 0) scale(1.05) rotate(0deg);
        opacity: 0.6;
    }
}

@keyframes aurora-spin-3 {
    0% {
        transform: translate3d(0, 0, 0) scale(0.95);
        opacity: 0.55;
    }
    50% {
        transform: translate3d(4vw, -4vh, 0) scale(1.18);
        opacity: 0.8;
    }
    100% {
        transform: translate3d(0, 0, 0) scale(0.95);
        opacity: 0.55;
    }
}

@keyframes cyber-grid-drift {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 60px;
    }
}

@keyframes particle-drift {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0.45;
    }
    50% {
        opacity: 0.85;
    }
    100% {
        transform: translate3d(-35px, -60px, 0);
        opacity: 0.45;
    }
}

@keyframes spotlight-pulse {
    0%, 100% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 0.95;
        transform: translateX(-50%) scale(1.08);
    }
}

@keyframes aura-pulse {
    0% {
        opacity: 0.25;
        transform: scale(1) translate(0, 0);
    }
    50% {
        opacity: 0.55;
        transform: scale(1.12) translate(3%, 3%);
    }
    100% {
        opacity: 0.25;
        transform: scale(1) translate(0, 0);
    }
}

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

@keyframes crown-float {
    0%, 100% {
        transform: translate(-50%, 0) rotate(0deg);
    }
    50% {
        transform: translate(-50%, -8px) rotate(-3deg);
    }
}

/* Modern Animated Luxury Cyber Background Container */
.mesh-gradient-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #0e131d 0%, #090b10 45%, #050608 100%);
    pointer-events: none;
}

/* Perspective Cyber Grid with Soft Masking */
.mesh-gradient-container .cyber-grid {
    position: absolute;
    inset: 0;
    background-size: 60px 60px;
    background-image: 
        linear-gradient(to right, rgba(37, 175, 244, 0.055) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(37, 175, 244, 0.055) 1px, transparent 1px);
    mask-image: radial-gradient(ellipse 90% 75% at 50% 25%, black 20%, transparent 85%);
    -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 25%, black 20%, transparent 85%);
    animation: cyber-grid-drift 35s linear infinite;
    pointer-events: none;
}

/* Ambient Stardust / Embers Layer */
.mesh-gradient-container .cyber-particles {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(2px 2px at 40px 60px, rgba(37, 175, 244, 0.9), transparent),
        radial-gradient(1.5px 1.5px at 140px 220px, rgba(255, 255, 255, 0.85), transparent),
        radial-gradient(2px 2px at 280px 110px, rgba(238, 175, 14, 0.9), transparent),
        radial-gradient(1.5px 1.5px at 420px 310px, rgba(37, 175, 244, 0.75), transparent),
        radial-gradient(2.5px 2.5px at 560px 180px, rgba(99, 102, 241, 0.85), transparent),
        radial-gradient(1.5px 1.5px at 700px 390px, rgba(255, 255, 255, 0.75), transparent),
        radial-gradient(2px 2px at 840px 90px, rgba(37, 175, 244, 0.85), transparent);
    background-size: 900px 500px;
    animation: particle-drift 22s ease-in-out infinite alternate;
    pointer-events: none;
}

/* Luminous Top Spotlight Beam */
.mesh-gradient-container .spotlight-beam {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    max-width: 95vw;
    height: 500px;
    background: radial-gradient(ellipse at center, rgba(37, 175, 244, 0.24) 0%, rgba(37, 175, 244, 0.06) 45%, transparent 75%);
    filter: blur(80px);
    animation: spotlight-pulse 10s ease-in-out infinite;
    pointer-events: none;
}

/* Dynamic Aurora Glow Blobs */
.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    will-change: transform, opacity;
    pointer-events: none;
}

.aurora-cyan {
    top: -10%;
    left: -8%;
    width: 55vw;
    height: 55vw;
    background: radial-gradient(circle, rgba(37, 175, 244, 0.32) 0%, rgba(37, 175, 244, 0.08) 50%, transparent 75%);
    animation: aurora-spin-1 18s ease-in-out infinite alternate;
}

.aurora-indigo {
    top: 18%;
    right: -10%;
    width: 58vw;
    height: 58vw;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.26) 0%, rgba(67, 56, 202, 0.07) 55%, transparent 75%);
    animation: aurora-spin-2 24s ease-in-out infinite alternate;
}

.aurora-gold {
    bottom: -12%;
    left: 18%;
    width: 48vw;
    height: 48vw;
    background: radial-gradient(circle, rgba(238, 175, 14, 0.2) 0%, rgba(238, 175, 14, 0.04) 50%, transparent 75%);
    animation: aurora-spin-3 26s ease-in-out infinite alternate;
}

.aurora-center {
    top: 30%;
    left: 30%;
    width: 42vw;
    height: 42vw;
    background: radial-gradient(circle, rgba(37, 175, 244, 0.14) 0%, transparent 70%);
    filter: blur(120px);
    animation: aura-pulse 12s ease-in-out infinite;
}

/* High-tech Edge Vignette */
.mesh-gradient-container .vignette-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 35%, transparent 45%, rgba(5, 6, 8, 0.7) 100%);
    pointer-events: none;
}

/* Rank-specific Hover & Elevation Effects */
.card-rank-1 {
    background: linear-gradient(180deg, rgba(238, 175, 14, 0.12) 0%, rgba(20, 21, 26, 0.85) 100%);
    border: 1px solid rgba(238, 175, 14, 0.45);
    box-shadow: 0 15px 35px -10px rgba(238, 175, 14, 0.25);
}

.card-rank-1:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -10px rgba(238, 175, 14, 0.45);
    border-color: rgba(238, 175, 14, 0.8) !important;
}

.card-rank-2 {
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.1) 0%, rgba(20, 21, 26, 0.85) 100%);
    border: 1px solid rgba(148, 163, 184, 0.3);
    box-shadow: 0 10px 25px -8px rgba(148, 163, 184, 0.18);
}

.card-rank-2:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(148, 163, 184, 0.3);
    border-color: rgba(148, 163, 184, 0.7) !important;
}

.card-rank-3 {
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.1) 0%, rgba(20, 21, 26, 0.85) 100%);
    border: 1px solid rgba(217, 119, 6, 0.3);
    box-shadow: 0 10px 25px -8px rgba(217, 119, 6, 0.18);
}

.card-rank-3:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px -10px rgba(217, 119, 6, 0.3);
    border-color: rgba(217, 119, 6, 0.7) !important;
}

/* Crown Styling for Champion */
.crown-stuck {
    transform: translate(-50%, 0);
    filter: drop-shadow(0 0 14px rgba(238, 175, 14, 0.75));
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.leaderboard-card:hover .crown-stuck {
    transform: translate(-50%, -3px) scale(1.08) !important;
    filter: drop-shadow(0 0 24px rgba(238, 175, 14, 1));
}

/* Table Row Hover Animations */
.row-rank-hover:hover {
    background: rgba(37, 175, 244, 0.06) !important;
}

/* Shimmer Highlight on VIP Elements */
.vip-shine {
    position: relative;
    overflow: hidden;
}

.vip-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        60deg,
        transparent 30%,
        rgba(255, 255, 255, 0.08) 50%,
        transparent 70%
    );
    transform: rotate(30deg);
    animation: shimmer 6s infinite;
    pointer-events: none;
}

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

::-webkit-scrollbar-track {
    background: #0c0d10;
}

::-webkit-scrollbar-thumb {
    background: #232a30;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #25aff4;
}

/* Privacy Blur Effect */
.privacy-masked {
    letter-spacing: 0.1em;
    font-family: 'Space Grotesk', monospace;
}

/* Roobet Navbar Button Logo hover effect */
.roobet-btn-logo {
    transition: filter 0.3s ease;
}

.group:hover .roobet-btn-logo {
    filter: brightness(0) !important;
}