/* ============================================
   COOL GRAPHICS & ADVANCED ANIMATIONS
   LeanAmp Technologies - Energy-Tech Theme
   Uses CSS Custom Properties from Global Settings
   ============================================ */

/* Theme colors - can be overridden by JavaScript */
:root {
    --graphics-primary: var(--primary-green, #006400);
    --graphics-secondary: var(--secondary-green, #16601A);
    --graphics-accent: var(--accent-gold, #FFD700);
}

/* ============================
   ANIMATED PARTICLE BACKGROUND
   ============================ */
.particle-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: floatParticle 20s infinite ease-in-out;
    opacity: 0.3;
}

@keyframes floatParticle {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    25% {
        transform: translate(100px, -100px) scale(1.2);
        opacity: 0.5;
    }
    50% {
        transform: translate(-50px, -200px) scale(0.8);
        opacity: 0.2;
    }
    75% {
        transform: translate(150px, -150px) scale(1.1);
        opacity: 0.4;
    }
}

/* ============================
   ENERGY WAVE ANIMATIONS
   ============================ */
.energy-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    overflow: hidden;
    pointer-events: none;
}

.energy-wave {
    position: absolute;
    bottom: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(var(--graphics-secondary-rgb), 0.3),
        rgba(var(--graphics-primary-rgb), 0.4),
        rgba(var(--graphics-accent-rgb), 0.3),
        transparent
    );
    animation: waveFlow 15s ease-in-out infinite;
}

.energy-wave:nth-child(2) {
    animation-delay: -5s;
    animation-duration: 20s;
    opacity: 0.5;
}

.energy-wave:nth-child(3) {
    animation-delay: -10s;
    animation-duration: 25s;
    opacity: 0.3;
}

@keyframes waveFlow {
    0%, 100% {
        transform: translateX(0%) translateY(0%);
    }
    50% {
        transform: translateX(50%) translateY(-20%);
    }
}

/* ============================
   ENERGY ORB GRAPHICS
   ============================ */
.energy-orb {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
}

.energy-orb::before,
.energy-orb::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    animation: orbPulse 3s ease-in-out infinite;
}

.energy-orb::before {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, 
        rgba(var(--graphics-accent-rgb), 0.8),
        rgba(var(--graphics-secondary-rgb), 0.6),
        rgba(var(--graphics-primary-rgb), 0.3),
        transparent
    );
    box-shadow: 
        0 0 40px rgba(var(--graphics-accent-rgb), 0.6),
        0 0 80px rgba(var(--graphics-secondary-rgb), 0.4),
        inset 0 0 40px rgba(var(--graphics-accent-rgb), 0.3);
}

.energy-orb::after {
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, 
        rgba(var(--graphics-accent-rgb), 1),
        rgba(var(--graphics-secondary-rgb), 0.8),
        transparent
    );
    animation-delay: -1.5s;
}

@keyframes orbPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 1;
    }
}

/* ============================
   GLASSMORPHISM EFFECTS
   ============================ */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px 0 rgba(var(--graphics-primary-rgb), 0.15),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(var(--graphics-accent-rgb), 0.4);
    box-shadow: 
        0 8px 32px 0 rgba(var(--graphics-secondary-rgb), 0.25),
        0 0 40px rgba(var(--graphics-accent-rgb), 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.4);
    transform: translateY(-8px);
}

/* ============================
   ANIMATED STATISTICS COUNTERS
   ============================ */
.stat-counter {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-gold), var(--secondary-green));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShiftCounter 4s ease infinite;
    display: inline-block;
    position: relative;
}

.stat-counter::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent,
        var(--accent-gold),
        transparent
    );
    animation: lineGlow 2s ease-in-out infinite;
}

@keyframes gradientShiftCounter {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes lineGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scaleX(0.8);
    }
    50% {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* ============================
   3D CARD TRANSFORMS
   ============================ */
.card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg) scale(1.05);
}

.card-3d-inner {
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card-3d:hover .card-3d-inner {
    transform: translateZ(30px);
}

/* ============================
   CIRCUIT BOARD PATTERN
   ============================ */
.circuit-pattern {
    position: relative;
    overflow: hidden;
}

.circuit-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 24%, rgba(var(--graphics-secondary-rgb), 0.05) 25%, rgba(var(--graphics-secondary-rgb), 0.05) 26%, transparent 27%, transparent 74%, rgba(var(--graphics-secondary-rgb), 0.05) 75%, rgba(var(--graphics-secondary-rgb), 0.05) 76%, transparent 77%, transparent),
        linear-gradient(0deg, transparent 24%, rgba(var(--graphics-secondary-rgb), 0.05) 25%, rgba(var(--graphics-secondary-rgb), 0.05) 26%, transparent 27%, transparent 74%, rgba(var(--graphics-secondary-rgb), 0.05) 75%, rgba(var(--graphics-secondary-rgb), 0.05) 76%, transparent 77%, transparent);
    background-size: 50px 50px;
    opacity: 0.3;
    pointer-events: none;
}

.circuit-pattern::after {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, 
        rgba(var(--graphics-accent-rgb), 0.1) 1px, 
        transparent 1px
    );
    background-size: 30px 30px;
    animation: circuitMove 30s linear infinite;
    pointer-events: none;
}

@keyframes circuitMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(30px, 30px); }
}

/* ============================
   ENERGY FLOW INDICATORS
   ============================ */
.energy-flow {
    position: relative;
    padding: 2rem;
    overflow: hidden;
}

.energy-flow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(var(--graphics-accent-rgb), 0.3),
        transparent
    );
    animation: energyFlowMove 3s ease-in-out infinite;
}

@keyframes energyFlowMove {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ============================
   ANIMATED PROGRESS RINGS
   ============================ */
.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.progress-ring-circle {
    transform: rotate(-90deg);
    transform-origin: center;
}

.progress-ring-circle circle {
    stroke-width: 8;
    fill: transparent;
    stroke: rgba(var(--graphics-primary-rgb), 0.2);
    stroke-linecap: round;
}

.progress-ring-circle circle.progress {
    stroke: url(#energyGradient);
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    animation: progressRingFill 2s ease-out forwards;
}

@keyframes progressRingFill {
    to {
        stroke-dashoffset: 0;
    }
}

/* ============================
   DECORATIVE CORNER ACCENTS
   ============================ */
.corner-accent {
    position: relative;
}

.corner-accent::before,
.corner-accent::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-gold);
    opacity: 0.5;
    transition: all 0.4s ease;
}

.corner-accent::before {
    top: -10px;
    left: -10px;
    border-right: none;
    border-bottom: none;
}

.corner-accent::after {
    bottom: -10px;
    right: -10px;
    border-left: none;
    border-top: none;
}

.corner-accent:hover::before,
.corner-accent:hover::after {
    width: 60px;
    height: 60px;
    opacity: 1;
    border-color: var(--primary-green);
}

/* ============================
   GLOWING BORDER ANIMATION
   ============================ */
.glow-border {
    position: relative;
    border-radius: var(--border-radius);
}

.glow-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--primary-green),
        var(--accent-gold),
        var(--secondary-green),
        var(--accent-gold),
        var(--primary-green)
    );
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: glowBorderRotate 8s ease infinite;
    opacity: 0.7;
}

@keyframes glowBorderRotate {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ============================
   ICON PULSE ANIMATIONS
   ============================ */
.icon-pulse {
    display: inline-block;
    position: relative;
}

.icon-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-gold);
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1);
    animation: iconPulseAnim 2s ease-out infinite;
}

@keyframes iconPulseAnim {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* ============================
   SHIMMER TEXT EFFECT
   ============================ */
.shimmer-text {
    background: linear-gradient(90deg,
        var(--primary-green) 0%,
        var(--accent-gold) 50%,
        var(--primary-green) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* ============================
   HOVER LIFT WITH SHADOW
   ============================ */
.hover-lift {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 60px rgba(var(--graphics-primary-rgb), 0.2),
        0 0 40px rgba(var(--graphics-accent-rgb), 0.3),
        0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ============================
   ANIMATED LIGHTNING BOLTS
   ============================ */
.lightning-icon {
    position: relative;
    display: inline-block;
}

.lightning-icon i {
    animation: lightningFlash 2s ease-in-out infinite;
}

@keyframes lightningFlash {
    0%, 50%, 100% {
        opacity: 1;
        color: var(--accent-gold);
        filter: drop-shadow(0 0 8px var(--accent-gold));
    }
    25%, 75% {
        opacity: 0.5;
        color: var(--primary-green);
        filter: drop-shadow(0 0 4px var(--primary-green));
    }
}

/* ============================
   ENERGY PARTICLE TRAIL
   ============================ */
.particle-trail {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent-gold);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-gold);
    animation: particleMove 4s linear infinite;
    opacity: 0;
}

@keyframes particleMove {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translate(300px, -200px);
        opacity: 0;
    }
}

/* ============================
   STEP CONNECTOR ANIMATIONS
   ============================ */
.step-connector {
    position: relative;
}

.step-connector::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
        var(--primary-green),
        var(--accent-gold)
    );
    animation: connectorFlow 2s ease-in-out infinite;
    transform-origin: left;
}

@keyframes connectorFlow {
    0%, 100% {
        opacity: 0.5;
        transform: scaleX(1);
    }
    50% {
        opacity: 1;
        transform: scaleX(1.1);
    }
}

/* ============================
   ROTATING GRADIENT BORDER
   ============================ */
.rotating-border {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.rotating-border::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: conic-gradient(
        var(--primary-green),
        var(--accent-gold),
        var(--secondary-green),
        var(--accent-gold),
        var(--primary-green)
    );
    animation: rotateBorder 4s linear infinite;
}

@keyframes rotateBorder {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.rotating-border-content {
    position: relative;
    z-index: 1;
    background: var(--white);
    border-radius: inherit;
    margin: 2px;
}

/* ============================
   HEXAGON GRID PATTERN
   ============================ */
.hexagon-grid {
    position: relative;
    background-image: 
        linear-gradient(30deg, rgba(var(--graphics-secondary-rgb), 0.05) 12%, transparent 12.5%, transparent 87%, rgba(var(--graphics-secondary-rgb), 0.05) 87.5%, rgba(var(--graphics-secondary-rgb), 0.05)),
        linear-gradient(150deg, rgba(var(--graphics-secondary-rgb), 0.05) 12%, transparent 12.5%, transparent 87%, rgba(var(--graphics-secondary-rgb), 0.05) 87.5%, rgba(var(--graphics-secondary-rgb), 0.05)),
        linear-gradient(30deg, rgba(var(--graphics-secondary-rgb), 0.05) 12%, transparent 12.5%, transparent 87%, rgba(var(--graphics-secondary-rgb), 0.05) 87.5%, rgba(var(--graphics-secondary-rgb), 0.05)),
        linear-gradient(150deg, rgba(var(--graphics-secondary-rgb), 0.05) 12%, transparent 12.5%, transparent 87%, rgba(var(--graphics-secondary-rgb), 0.05) 87.5%, rgba(var(--graphics-secondary-rgb), 0.05));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px, 0 0, 40px 70px;
}

/* ============================
   PULSING DOT INDICATOR
   ============================ */
.pulse-dot {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-gold);
    box-shadow: 0 0 0 0 rgba(var(--graphics-accent-rgb), 0.7);
    animation: pulseDot 2s ease-out infinite;
}

@keyframes pulseDot {
    0% {
        box-shadow: 0 0 0 0 rgba(var(--graphics-accent-rgb), 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(var(--graphics-accent-rgb), 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(var(--graphics-accent-rgb), 0);
    }
}

/* ============================
   ANIMATED UNDERLINE
   ============================ */
.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.animated-underline:hover::after {
    width: 100%;
}

/* ============================
   RESPONSIVE ADJUSTMENTS
   ============================ */
@media (max-width: 768px) {
    .energy-orb {
        width: 70px;
        height: 70px;
    }
    
    .stat-counter {
        font-size: 2rem;
    }
    
    .progress-ring {
        width: 90px;
        height: 90px;
    }
    
    .corner-accent::before,
    .corner-accent::after {
        width: 30px;
        height: 30px;
    }
}

/* ============================
   PERFORMANCE OPTIMIZATION
   ============================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
