/* ============================================
   ADVANCED ANIMATIONS & INTERACTIONS
   ============================================ */

/* Animated Background Gradient */
.hero {
    background: linear-gradient(-45deg, #0d1442, #1a237e, #283593, #1a237e);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
}

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

/* Particle Background */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 167, 38, 0.6);
    border-radius: 50%;
    animation: particleFloat 20s infinite;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Glowing Orbs */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: orbFloat 8s ease-in-out infinite;
}

.glow-orb-1 {
    width: 400px;
    height: 400px;
    background: #ffa726;
    top: -100px;
    right: -100px;
}

.glow-orb-2 {
    width: 300px;
    height: 300px;
    background: #00c853;
    bottom: -50px;
    left: -50px;
    animation-delay: 2s;
}

.glow-orb-3 {
    width: 200px;
    height: 200px;
    background: #7c4dff;
    top: 50%;
    left: 30%;
    animation-delay: 4s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(10px, 10px) scale(1.05); }
}

/* Hero Lines Animation */
.hero-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.hero-line {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(255, 167, 38, 0.3), transparent);
    animation: lineMove 8s linear infinite;
}

.hero-line:nth-child(1) { left: 20%; animation-delay: 0s; }
.hero-line:nth-child(2) { left: 50%; animation-delay: 2s; }
.hero-line:nth-child(3) { left: 80%; animation-delay: 4s; }

@keyframes lineMove {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    animation: fadeInUp 1s ease 1.5s both;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: #ffa726;
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

@keyframes scrollWheel {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(10px); opacity: 0.3; }
}

.scroll-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Word Animation */
.word-wrapper {
    display: inline-block;
    overflow: hidden;
}

.animate-word {
    display: inline-block;
    animation: slideUp 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
    opacity: 0;
    transform: translateY(100%);
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse Glow Effect */
.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.4); }
    50% { box-shadow: 0 0 20px 5px rgba(0, 200, 83, 0.2); }
}

/* Button Shine Effect */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s ease-in-out infinite;
}

@keyframes shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Staggered Grid Animation */
.stagger-grid > * {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.stagger-grid.active > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-grid.active > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-grid.active > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-grid.active > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-grid.active > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-grid.active > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-grid.active > *:nth-child(7) { transition-delay: 0.7s; }

.stagger-grid.active > * {
    opacity: 1;
    transform: translateY(0);
}

/* Magnetic Button Effect */
.magnetic-btn {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.magnetic-btn:hover {
    transform: scale(1.05);
}

/* 3D Card Tilt Effect */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(var(--rotateX, 0deg)) rotateY(var(--rotateY, 0deg));
}

/* Service Card Enhanced */
.service-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.service-card:hover::after {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.service-icon-wrapper {
    position: relative;
    display: inline-block;
}

.service-icon-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 167, 38, 0.2), transparent 70%);
    border-radius: 50%;
    transition: all 0.5s;
}

.service-card:hover .service-icon-bg {
    width: 150px;
    height: 150px;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, #ffa726, #ffb74d);
    color: #0d1442;
}

/* Project Card Enhanced */
.project-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.project-image {
    position: relative;
    overflow: hidden;
}

.project-image-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #1a237e, #283593);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.3);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 35, 126, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-view-btn {
    width: 60px;
    height: 60px;
    background: #ffa726;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0d1442;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.project-card:hover .project-view-btn {
    transform: scale(1);
}

.project-view-btn:hover {
    background: #ffb74d;
    transform: scale(1.1);
}

/* Floating Cards */
.floating-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.floating-card-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.floating-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a237e;
}

.floating-card-value.text-green {
    color: #00c853;
}

.floating-card-label {
    font-size: 0.75rem;
    color: #757575;
}

.verified-badge {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1a237e, #283593);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rating-card {
    background: linear-gradient(135deg, #ffa726, #ffb74d);
    padding: 12px 16px;
}

.rating-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 4px;
}

.rating-text {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1a237e;
}

.card-glow {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 30px rgba(255, 167, 38, 0.1);
}

/* Float Animation */
.float-animation {
    animation: floatUpDown 6s ease-in-out infinite;
}

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

/* Price Tag Animation */
.price-tag {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.price-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a237e;
}

.price-change {
    font-size: 0.875rem;
    font-weight: 600;
}

.price-change.positive {
    color: #00c853;
}

.animate-pulse {
    animation: pulseFade 2s ease-in-out infinite;
}

@keyframes pulseFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Live Indicator */
.live-indicator {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 200, 83, 0.2);
    border-radius: 20px;
    font-size: 12px;
    color: #00c853;
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #00c853;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

/* Trading Chart */
.trading-chart-animated {
    position: relative;
    width: 100%;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
}

.chart-candles {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 60%;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.chart-line-path {
    fill: none;
    stroke: #ffa726;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 10px rgba(255, 167, 38, 0.5));
}

.chart-area {
    fill: url(#chartGradient);
    opacity: 0.3;
}

.chart-dot {
    fill: #ffa726;
    filter: drop-shadow(0 0 8px rgba(255, 167, 38, 0.8));
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { r: 6; }
    50% { r: 10; }
}

/* Platform Cards */
.platform-card {
    position: relative;
    overflow: hidden;
}

.platform-card::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 167, 38, 0.3), transparent 70%);
    transform: translate(-50%, -50%);
    transition: all 0.5s;
    border-radius: 50%;
}

.platform-card:hover::before {
    width: 300px;
    height: 300px;
}

.platform-arrow {
    transition: transform 0.3s;
    opacity: 0.5;
    margin-left: auto;
}

.platform-card:hover .platform-arrow {
    transform: translate(5px, -5px);
    opacity: 1;
}

/* CTA Section */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-bg-animation {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cta-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 167, 38, 0.15), transparent 70%);
}

.cta-circle-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
    animation: ctaFloat 10s ease-in-out infinite;
}

.cta-circle-2 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    animation: ctaFloat 8s ease-in-out infinite reverse;
}

.cta-circle-3 {
    width: 300px;
    height: 300px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: ctaPulse 4s ease-in-out infinite;
}

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

@keyframes ctaPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.1; }
}

.cta-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 167, 38, 0.2);
    color: #ffa726;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 30px;
    margin-bottom: 20px;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.trust-badge svg {
    color: #ffa726;
}

/* Skill Bars Animation */
.skill-progress {
    position: relative;
    overflow: hidden;
}

.skill-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

/* Mouse Follower */
.mouse-follower {
    position: fixed;
    width: 20px;
    height: 20px;
    background: #ffa726;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transition: transform 0.15s ease-out;
    opacity: 0;
}

.mouse-follower.active {
    opacity: 1;
}

.mouse-follower.hover {
    transform: scale(3);
}

/* Scroll Progress Bar */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffa726, #00c853);
    z-index: 9999;
    transition: width 0.1s;
}

/* Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0d1442 0%, #1a237e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 167, 38, 0.2);
    border-top-color: #ffa726;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: relative;
}

.loader-spinner::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 3px solid transparent;
    border-top-color: #00c853;
    border-radius: 50%;
    animation: spin 0.8s linear infinite reverse;
}

.loader-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.3) 10%, transparent 10%);
    background-repeat: no-repeat;
    background-position: 50%;
    transform: scale(10);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.ripple:active::after {
    transform: scale(0);
    opacity: 1;
    transition: 0s;
}

/* Section Divider */
.section-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.section-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-visual {
        order: -1;
        max-width: 350px;
        margin: 0 auto;
    }

    .trust-badges {
        flex-wrap: wrap;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .mouse-follower,
    .glow-orb,
    .particles,
    .hero-lines,
    .scroll-indicator {
        display: none;
    }

    .floating-card {
        display: none;
    }

    .about-mini-stats {
        flex-direction: column;
    }

    .trust-badges {
        flex-direction: column;
        align-items: center;
    }
}

/* 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;
    }
}
