html,
body {
    overflow-x: clip;
    width: 100%;
}

/* Core Variables for the Aurora System */
:root {
    --aurora-1: rgba(59, 130, 246, 0.15);
    /* Blue Light Mode */
    --aurora-2: rgba(147, 51, 234, 0.15);
    /* Purple Light Mode */
    --aurora-3: rgba(6, 182, 212, 0.1);
    /* Cyan Light Mode */
    --grid-color: rgba(0, 0, 0, 0.04);
}

.dark {
    --aurora-1: rgba(59, 130, 246, 0.2);
    /* Blue Dark Mode */
    --aurora-2: rgba(147, 51, 234, 0.2);
    /* Purple Dark Mode */
    --aurora-3: rgba(6, 182, 212, 0.15);
    /* Cyan Dark Mode */
    --grid-color: rgba(255, 255, 255, 0.03);
}

/* Glassmorphism System - Day/Night Adaptive */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    transition: background 0.5s ease, border-color 0.5s ease;
}

.dark .glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Glass Card with Hover Physics */
.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dark .glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05), 0 0 20px rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
}

.dark .glass-card:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(147, 51, 234, 0.15);
    border-color: rgba(147, 51, 234, 0.3);
}

/* Navbar Glass */
.glass-nav {
    background: transparent;
    transition: all 0.3s ease;
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .glass-nav.scrolled {
    background: rgba(10, 10, 10, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Quantum Grid Overlay */
.quantum-grid {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
    mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
    transition: background-image 0.5s ease;
}

/* Aurora Gradient Animations */
.aurora {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(80px);
    mix-blend-mode: multiply;
    animation: float-aurora 20s infinite ease-in-out alternate;
    transition: background-color 0.5s ease;
    z-index: -1;
}

.dark .aurora {
    mix-blend-mode: screen;
}

.aurora-1 {
    top: -10%;
    left: -10%;
    background: var(--aurora-1);
    animation-delay: 0s;
}

.aurora-2 {
    bottom: -10%;
    right: -10%;
    background: var(--aurora-2);
    animation-delay: -5s;
}

.aurora-3 {
    top: 40%;
    left: 40%;
    background: var(--aurora-3);
    width: 40vw;
    height: 40vw;
    animation-delay: -10s;
}

@keyframes float-aurora {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }

    33% {
        transform: translate(5%, 5%) scale(1.1) rotate(5deg);
    }

    66% {
        transform: translate(-5%, 10%) scale(0.9) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
}

/* Timeline specific styles */
.timeline-node {
    transition: all 0.5s ease;
}

.timeline-node.active {
    background: linear-gradient(135deg, #3b82f6, #9333ea);
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.4);
    border-color: transparent;
}

.timeline-line {
    transition: height 0.1s ease-out;
    /* Changed from 1s to 0.1s */
    background: linear-gradient(to bottom, #3b82f6, #9333ea);
}

/* Swiper Override for specific Theme Colors */
.swiper-pagination-bullet {
    background: rgba(148, 163, 184, 0.5) !important;
}

.swiper-pagination-bullet-active {
    background: #3b82f6 !important;
    width: 24px !important;
    border-radius: 10px !important;
}

/* Elegant Text Gradients */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(to right, #3b82f6, #9333ea);
}

/* Wide Cinematic Carousel Specifics */
.wideActivitySwiper {
    padding: 20px 0;
    overflow: visible;
    /* Allows shadows to render properly */
}

.wideActivitySwiper .swiper-slide {
    opacity: 0.4;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(0.9);
}

.wideActivitySwiper .swiper-slide-active {
    opacity: 1;
    transform: scale(1);
    z-index: 10;
}

/* 3D App Icon Button Physics */
.app-icon-btn {
    /* Creates the main drop shadow, the top white gloss highlight, and the bottom dark inner shadow */
    box-shadow:
        0 15px 25px -5px rgba(0, 0, 0, 0.2),
        inset 0 3px 2px rgba(255, 255, 255, 0.4),
        inset 0 -6px 6px rgba(0, 0, 0, 0.15);
}

.dark .app-icon-btn {
    box-shadow:
        0 15px 30px -5px rgba(0, 0, 0, 0.6),
        inset 0 3px 2px rgba(255, 255, 255, 0.2),
        inset 0 -6px 6px rgba(0, 0, 0, 0.3);
}

.app-icon-btn:hover {
    box-shadow:
        0 25px 35px -10px rgba(0, 0, 0, 0.3),
        inset 0 3px 2px rgba(255, 255, 255, 0.5),
        inset 0 -6px 6px rgba(0, 0, 0, 0.15);
}

.dark .app-icon-btn:hover {
    box-shadow:
        0 25px 35px -10px rgba(0, 0, 0, 0.8),
        inset 0 3px 2px rgba(255, 255, 255, 0.3),
        inset 0 -6px 6px rgba(0, 0, 0, 0.3);
}

/* Infinite Marquee Animation */
@keyframes scroll-x {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    animation: scroll-x 40s linear infinite;
    /* This ensures the animation width handles the duplicated track */
    width: max-content;
}

/* Pause the marquee when a user hovers over it to read a rank */
.marquee-container:hover .animate-marquee {
    animation-play-state: paused;
}

/* Infinite Marquee Animation for Top Achievers */
@keyframes infinite-scroll {
    0% {
        transform: translateX(0);
    }

    /* Moves exactly halfway across the container (one full set + gap) */
    100% {
        transform: translateX(calc(-50% - 0.75rem));
    }
}

.animate-infinite-scroll {
    /* 40s dictates the speed. Lower = faster, Higher = slower */
    animation: infinite-scroll 40s linear infinite;
}

/* Fades the left and right edges of the slider container */
.fade-edges {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 16px;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.3s ease;
    filter: none;
    mix-blend-mode: normal;
    will-change: opacity;
    z-index: 0;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}