:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #8b5cf6;
    --dark: #1e293b;
    --text-muted: #64748b;
    --light: #f8fafc;
    --glass-bg: rgba(255, 255, 255, 0.65);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

body {
    font-family: 'Outfit', sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    color: var(--dark);
    overflow-x: hidden;
    position: relative;
}

/* --- Animated Background --- */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.floating-icon {
    position: absolute;
    font-size: 3rem;
    opacity: 0.1;
    color: var(--primary);
    animation: floatIcon 20s infinite linear;
}

.floating-icon:nth-child(1) {
    top: 10%;
    left: 10%;
    animation-duration: 25s;
    font-size: 4rem;
    color: var(--secondary);
}

.floating-icon:nth-child(2) {
    top: 20%;
    right: 20%;
    animation-duration: 30s;
    animation-delay: -5s;
}

.floating-icon:nth-child(3) {
    bottom: 15%;
    left: 30%;
    animation-duration: 22s;
    animation-delay: -10s;
    color: var(--accent);
}

.floating-icon:nth-child(4) {
    bottom: 10%;
    right: 10%;
    animation-duration: 28s;
    font-size: 5rem;
    color: var(--primary);
    opacity: 0.05;
}

.floating-icon:nth-child(5) {
    top: 50%;
    left: 50%;
    animation-duration: 35s;
    font-size: 2rem;
}

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    z-index: -2;
    animation: pulseBlob 10s infinite alternate;
}

.blob-1 {
    top: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.2);
}

.blob-2 {
    bottom: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(236, 72, 153, 0.2);
    animation-delay: -5s;
}

@keyframes floatIcon {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

@keyframes pulseBlob {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.1);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation-fill-mode: both;
}

/* --- Glassmorphism Components --- */
.glass-card {
    background: var(--glass-bg);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: white;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

.glass-card:hover .icon-box {
    transform: scale(1.1) rotate(-5deg);
    background: var(--gradient-primary);
    color: white;
}

/* --- Buttons --- */
.btn-primary-gradient {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    color: white;
    filter: brightness(1.1);
}

/* --- Sidebar & Layout --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.5);
    padding: 30px 20px;
    z-index: 1000;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.03);
}

.nav-link {
    color: var(--text-muted);
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 5px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

.nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
    font-size: 1.1em;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    transform: translateX(5px);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.main-content {
    margin-left: 260px;
    padding: 40px;
}

/* --- Stat Cards --- */
.stat-card {
    border: none;
    overflow: hidden;
}

.stat-card .stat-icon {
    position: absolute;
    right: -10px;
    top: -10px;
    font-size: 6rem;
    opacity: 0.05;
    transform: rotate(15deg);
    transition: all 0.5s;
}

.stat-card:hover .stat-icon {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.1;
}

/* === PREMIUM ANIMATED BACKGROUND === */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bg-gradient-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(99, 102, 241, 0.03) 0%,
            rgba(139, 92, 246, 0.05) 25%,
            rgba(236, 72, 153, 0.03) 50%,
            rgba(99, 102, 241, 0.05) 75%,
            rgba(139, 92, 246, 0.03) 100%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Particles */
#particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    opacity: 0.4;
    animation: particleFloat 15s infinite ease-in-out;
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }

    25% {
        transform: translate(50px, -100px) scale(1.2);
        opacity: 0.6;
    }

    50% {
        transform: translate(-30px, -200px) scale(0.8);
        opacity: 0.3;
    }

    75% {
        transform: translate(80px, -50px) scale(1.1);
        opacity: 0.5;
    }
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-shapes .shape {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.15);
    animation: shapeFloat 20s infinite ease-in-out;
}

.floating-shapes .shape i {
    color: var(--primary);
    opacity: 0.6;
}

.shape-1 {
    top: 8%;
    left: 5%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    animation-delay: 0s;
}

.shape-2 {
    top: 15%;
    right: 10%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    animation-delay: -3s;
}

.shape-3 {
    top: 40%;
    left: 3%;
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    animation-delay: -5s;
}

.shape-4 {
    bottom: 25%;
    left: 8%;
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
    animation-delay: -8s;
}

.shape-5 {
    bottom: 15%;
    right: 5%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    animation-delay: -10s;
}

.shape-6 {
    top: 60%;
    right: 3%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    animation-delay: -12s;
}

.shape-7 {
    top: 25%;
    left: 15%;
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
    animation-delay: -15s;
}

.shape-8 {
    bottom: 40%;
    right: 12%;
    width: 42px;
    height: 42px;
    font-size: 1rem;
    animation-delay: -7s;
}

@keyframes shapeFloat {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, -30px) rotate(10deg);
    }

    50% {
        transform: translate(-15px, 20px) rotate(-5deg);
    }

    75% {
        transform: translate(25px, 15px) rotate(8deg);
    }
}

/* Gradient Orbs */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbPulse 10s infinite alternate ease-in-out;
}

.orb-1 {
    top: -15%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
}

.orb-2 {
    bottom: -20%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, transparent 70%);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    animation-delay: -3s;
}

@keyframes orbPulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* === 3D HERO CONTAINER === */
.hero-section {
    min-height: 100vh;
    padding-top: 100px;
    position: relative;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-3d-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    height: 450px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#brain-canvas {
    position: absolute;
    z-index: 2;
}

.hero-3d-glow {
    position: absolute;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(40px);
    animation: glowPulse 3s infinite alternate ease-in-out;
    z-index: 1;
}

@keyframes glowPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Orbit Rings */
.orbit-ring {
    position: absolute;
    border: 2px solid rgba(99, 102, 241, 0.15);
    border-radius: 50%;
    animation: orbitRotate 10s linear infinite;
}

.ring-1 {
    width: 350px;
    height: 350px;
    animation-duration: 15s;
}

.ring-2 {
    width: 420px;
    height: 420px;
    animation-duration: 20s;
    animation-direction: reverse;
    border-color: rgba(139, 92, 246, 0.1);
}

.ring-3 {
    width: 280px;
    height: 280px;
    animation-duration: 12s;
    border-color: rgba(236, 72, 153, 0.1);
}

.orbit-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--gradient-primary);
    border-radius: 50%;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.6);
}

.ring-2 .orbit-dot {
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.ring-3 .orbit-dot {
    background: linear-gradient(135deg, #ec4899, #f97316);
    width: 10px;
    height: 10px;
    top: -5px;
}

@keyframes orbitRotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Floating Icons around 3D */
.floating-icons {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 3;
}

.float-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
    animation: iconBounce 4s infinite ease-in-out;
}

.float-icon i {
    font-size: 1.3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icon-1 {
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.icon-2 {
    top: 15%;
    right: 5%;
    animation-delay: -1s;
}

.icon-3 {
    bottom: 20%;
    left: 0%;
    animation-delay: -2s;
}

.icon-4 {
    bottom: 10%;
    right: 10%;
    animation-delay: -3s;
}

@keyframes iconBounce {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(5deg);
    }
}

/* === RESPONSIVE === */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-3d-container {
        max-width: 320px;
        height: 320px;
    }

    .ring-1 {
        width: 260px;
        height: 260px;
    }

    .ring-2 {
        width: 310px;
        height: 310px;
    }

    .ring-3 {
        width: 200px;
        height: 200px;
    }

    .floating-shapes .shape {
        display: none;
    }

    .shape-1,
    .shape-2,
    .shape-4,
    .shape-5 {
        display: flex !important;
    }

    .float-icon {
        width: 40px;
        height: 40px;
    }

    .float-icon i {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-3d-container {
        max-width: 280px;
        height: 280px;
    }

    .ring-1 {
        width: 220px;
        height: 220px;
    }

    .ring-2 {
        width: 260px;
        height: 260px;
    }

    .ring-3 {
        width: 170px;
        height: 170px;
    }
}