/**
 * Rechargily - Frontend Enhanced Styles
 * Creative & Modern UI/UX Enhancements
 */

:root {
    /* Enhanced Gradients */
    --gradient-magical: linear-gradient(135deg, #2E1065 0%, #5B21B6 50%, #7C3AED 100%);
    --gradient-ocean: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --gradient-sunset: linear-gradient(135deg, #ff6b9d 0%, #ffa06b 100%);
    --gradient-forest: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
    --gradient-aurora: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-bg-light: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: 20px;

    /* Enhanced Shadows */
    --shadow-purple-glow: 0 20px 60px rgba(46, 16, 101, 0.4);
    --shadow-pink-glow: 0 20px 60px rgba(253, 121, 168, 0.4);
    --shadow-blue-glow: 0 20px 60px rgba(0, 206, 201, 0.4);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 15px 50px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 25px 70px rgba(0, 0, 0, 0.2);
}

/* ============================================
   HERO SECTION ENHANCEMENTS
   ============================================ */

/* Animated Gradient Background */
.hero-section {
    background: linear-gradient(270deg, #2E1065, #5B21B6, #7C3AED, #9333EA);
    background-size: 800% 800%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Enhanced Hero Title with Gradient Text */
.hero-title {
    background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.5));
}

/* 3D Floating Cards Enhancement */
.hero-card {
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-card:hover {
    transform: perspective(1000px) rotateY(10deg) rotateX(5deg) translateZ(20px);
}

/* Enhanced CTA Buttons */
.btn-light,
.btn-outline-light {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.btn-light::before,
.btn-outline-light::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-light:hover::before,
.btn-outline-light:hover::before {
    width: 300px;
    height: 300px;
}

.btn-light:active,
.btn-outline-light:active {
    transform: translateY(-3px) scale(0.98);
}

/* Enhanced Stat Items with Glow */
.stat-item {
    background: var(--glass-bg-light);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(var(--glass-blur));
    position: relative;
    overflow: hidden;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: var(--shadow-purple-glow);
}

/* ============================================
   FEATURE CARDS - GLASS MORPHISM
   ============================================ */

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-magical);
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.feature-card:hover::before {
    opacity: 0.3;
}

.feature-card:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: var(--shadow-purple-glow);
}

/* 3D Transform for Feature Icons */
.feature-icon {
    transform-style: preserve-3d;
    position: relative;
}

.feature-icon::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: inherit;
    border-radius: inherit;
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.feature-card:hover .feature-icon::after {
    opacity: 0.6;
}

.feature-card:hover .feature-icon {
    transform: perspective(500px) translateZ(30px) rotateY(10deg);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: perspective(500px) translateZ(30px) translateY(0) rotateY(10deg);
    }

    50% {
        transform: perspective(500px) translateZ(30px) translateY(-10px) rotateY(-5deg);
    }
}

/* ============================================
   CATEGORY CARDS - ENHANCED
   ============================================ */

.category-card {
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.category-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-magical);
    opacity: 0;
    border-radius: inherit;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.category-card:hover::after {
    opacity: 0.1;
}

.category-card:hover {
    transform: translateY(-12px) perspective(1000px) rotateX(5deg);
    box-shadow: var(--shadow-strong);
}

/* Magnetic Effect for Category Icons */
.category-icon {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.category-card:hover .category-icon {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 10px 20px rgba(46, 16, 101, 0.4));
}

/* ============================================
   OPERATOR CARDS - SHIMMER EFFECT
   ============================================ */

.operator-card {
    position: relative;
    overflow: hidden;
}

.operator-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.operator-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-15px) scale(1.05);
    box-shadow: var(--shadow-blue-glow);
}

/* ============================================
   GAMING CARDS - FLIP EFFECT
   ============================================ */

.gaming-card {
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.gaming-card:hover {
    transform: translateY(-20px) rotateY(5deg) rotateX(2deg);
}

.gaming-card-img {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
}

.gaming-card-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(46, 16, 101, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gaming-card:hover .gaming-card-img::before {
    opacity: 1;
}

/* Badge Pulse Animation */
.gaming-card-badge {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
}

/* ============================================
   HOW IT WORKS - ENHANCED
   ============================================ */

.step-number {
    position: relative;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.step-number::before {
    content: '';
    position: absolute;
    inset: -5px;
    background: white;
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.step-card:hover .step-number::before {
    opacity: 0.3;
    transform: scale(1.2);
}

.step-card:hover .step-number {
    transform: scale(1.15) rotate(360deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Animated Connection Line */
.step-line {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.1) 0%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0.1) 100%);
    background-size: 200% 100%;
    animation: lineFlow 3s linear infinite;
}

@keyframes lineFlow {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 200% 0%;
    }
}

/* ============================================
   TESTIMONIALS - 3D DEPTH
   ============================================ */

.testimonial-card {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.testimonial-card:hover {
    transform: translateY(-15px) rotateX(2deg) rotateY(2deg);
    box-shadow: var(--shadow-strong);
}

.testimonial-stars {
    display: inline-block;
    animation: starGlow 2s ease-in-out infinite;
}

@keyframes starGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px #f1c40f);
    }

    50% {
        filter: drop-shadow(0 0 15px #f1c40f);
    }
}

/* ============================================
   CTA SECTION - PULSING EFFECT
   ============================================ */

.cta-buttons .btn {
    position: relative;
    animation: ctaPulse 2s ease-in-out infinite;
}

@keyframes ctaPulse {

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

    50% {
        transform: scale(1.05);
    }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

/* Reveal Animations - Optimized */
.reveal {
    will-change: opacity, transform;
}

.reveal-left,
.reveal-right {
    will-change: opacity, transform;
}

/* Stagger delays for smooth sequential animations */
.reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.reveal:nth-child(4) {
    transition-delay: 0.4s;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Glass Effect Utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

/* Gradient Text Utility */
.gradient-text {
    background: var(--gradient-magical);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow Effect Utility */
.glow-purple {
    box-shadow: var(--shadow-purple-glow);
}

.glow-pink {
    box-shadow: var(--shadow-pink-glow);
}

.glow-blue {
    box-shadow: var(--shadow-blue-glow);
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* GPU Acceleration for Animations */
.feature-card,
.category-card,
.gaming-card,
.testimonial-card,
.stat-item,
.operator-card {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero-section {
        animation: none;
        background: linear-gradient(135deg, #2E1065 0%, #5B21B6 100%);
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {

    /* Reduce 3D effects on mobile for better performance */
    .feature-card:hover,
    .category-card:hover,
    .gaming-card:hover {
        transform: translateY(-10px);
    }

    .hero-card {
        transform: none !important;
    }

    /* Simplify shadows on mobile */
    .stat-item:hover,
    .feature-card:hover,
    .category-card:hover {
        box-shadow: var(--shadow-soft);
    }
}