/* ==========================================================================
   LIMS - Round Animated Menu Icons & Interactive Keyframe Animations
   ========================================================================== */

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

/* Menu Card */
.menu-card {
    background: rgba(18, 26, 44, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.75rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.menu-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px var(--card-glow);
    border-color: var(--card-border);
}

/* Custom Themes per Menu Item */
.menu-card.theme-formulas {
    --card-glow: rgba(6, 182, 212, 0.4);
    --card-border: rgba(6, 182, 212, 0.5);
    --icon-gradient: linear-gradient(135deg, #06b6d4, #0284c7);
}
.menu-card.theme-formulas::before {
    background: linear-gradient(90deg, #06b6d4, #38bdf8);
}

.menu-card.theme-batches {
    --card-glow: rgba(245, 158, 11, 0.4);
    --card-border: rgba(245, 158, 11, 0.5);
    --icon-gradient: linear-gradient(135deg, #f59e0b, #d97706);
}
.menu-card.theme-batches::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.menu-card.theme-materials {
    --card-glow: rgba(99, 102, 241, 0.4);
    --card-border: rgba(99, 102, 241, 0.5);
    --icon-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
}
.menu-card.theme-materials::before {
    background: linear-gradient(90deg, #6366f1, #a855f7);
}

.menu-card.theme-users {
    --card-glow: rgba(16, 185, 129, 0.4);
    --card-border: rgba(16, 185, 129, 0.5);
    --icon-gradient: linear-gradient(135deg, #10b981, #059669);
}
.menu-card.theme-users::before {
    background: linear-gradient(90deg, #10b981, #34d399);
}

/* ==========================================================================
   Round Animated Icon Container
   ========================================================================== */
.round-icon-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Outer Pulsing Aura Ring */
.round-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--card-glow);
    opacity: 0.2;
    animation: pulseRing 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
}

/* Orbiting Dashed Border Ring */
.round-orbit-ring {
    position: absolute;
    width: 110%;
    height: 110%;
    border-radius: 50%;
    border: 1.5px dashed var(--card-border);
    animation: orbitRotate 14s linear infinite;
    opacity: 0.6;
    pointer-events: none;
}

.round-orbit-ring::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 10px #ffffff;
    transform: translateX(-50%);
}

.menu-card:hover .round-orbit-ring {
    animation-duration: 4s;
    opacity: 1;
}

/* Main Circle */
.round-icon-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--icon-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.3);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.menu-card:hover .round-icon-circle {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), inset 0 2px 6px rgba(255, 255, 255, 0.5), 0 0 25px var(--card-glow);
}

.round-icon-circle svg {
    width: 44px;
    height: 44px;
    color: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Individual Icon Micro-Animations */
/* 1. Formula / Flask Animation */
.theme-formulas .round-icon-circle svg {
    animation: flaskTilt 4s ease-in-out infinite;
}
.menu-card.theme-formulas:hover .round-icon-circle svg {
    animation: flaskBubble 1.2s ease-in-out infinite alternate;
}

/* 2. Batching / Scale / Gears Animation */
.theme-batches .round-icon-circle svg {
    animation: gearBob 3s ease-in-out infinite;
}
.menu-card.theme-batches:hover .round-icon-circle svg {
    animation: gearSpin 2.5s linear infinite;
}

/* 3. Raw Materials / Molecule Animation */
.theme-materials .round-icon-circle svg {
    animation: moleculeFloat 3.5s ease-in-out infinite;
}
.menu-card.theme-materials:hover .round-icon-circle svg {
    animation: atomOrbit 2s ease-in-out infinite;
}

/* 4. Users / Security Shield Animation */
.theme-users .round-icon-circle svg {
    animation: shieldBreath 3s ease-in-out infinite;
}
.menu-card.theme-users:hover .round-icon-circle svg {
    animation: shieldPulse 1s ease-in-out infinite alternate;
}

/* Card Content */
.menu-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: color 0.2s ease;
}

.menu-card:hover .menu-card-title {
    color: #ffffff;
}

.menu-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

.menu-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.menu-card:hover .menu-card-badge {
    background: var(--card-glow);
    color: #ffffff;
    border-color: var(--card-border);
}

/* ==========================================================================
   Keyframe Definitions
   ========================================================================== */
@keyframes pulseRing {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.25);
        opacity: 0;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
}

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

@keyframes flaskTilt {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-6deg);
    }
    75% {
        transform: rotate(6deg);
    }
}

@keyframes flaskBubble {
    0% {
        transform: translateY(0) scale(1);
    }
    100% {
        transform: translateY(-4px) scale(1.08);
    }
}

@keyframes gearBob {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

@keyframes gearSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes moleculeFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-5px) rotate(4deg);
    }
}

@keyframes atomOrbit {
    0% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.1) rotate(180deg);
    }
    100% {
        transform: scale(1) rotate(360deg);
    }
}

@keyframes shieldBreath {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.04);
    }
}

@keyframes shieldPulse {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.12);
    }
}

/* Quick Stats Bar on Menu Page */
.stats-bar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(10px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}
