/* Container entry animation */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tree-card {
    animation: fadeInScale 0.4s ease-out forwards;
}

/* Node Float Anim */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0px); }
}

.node-float {
    animation: float 3s ease-in-out infinite;
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 20px rgba(56, 189, 248, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary {
    transition: all 0.2s ease-out;
}

.btn-primary:hover {
    transform: scale(1.03);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Tree Container Inner Glow & Gradient */
.tree-stage {
    background: radial-gradient(circle at center, rgba(56, 189, 248, 0.05) 0%, transparent 70%);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5);
}

/* Badge Glow Animations */
.glow-red {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.6);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 25px rgba(239, 68, 68, 0.8);
    }

    100% {
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    }
}

.glow-green {
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.6);
}

.glow-yellow {
    animation: blink-yellow 1.5s infinite;
}

@keyframes blink-yellow {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 15px rgba(234, 179, 8, 0.5);
    }

    50% {
        opacity: 0.6;
        box-shadow: 0 0 5px rgba(234, 179, 8, 0.2);
    }
}

/* D3 Tooltip */
.d3-tooltip {
    position: absolute;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.9);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.8rem;
    pointer-events: none;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transform: translateY(10px);
    transition: opacity 0.2s, transform 0.2s;
    z-index: 50;
}