/* ===================================
   AZTEK THEME - ADVANCED ANIMATIONS
   =================================== */

/* ========== Scroll Animations ========== */
/* NOTE: Elements are visible by default, animations enhance them */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.animate {
    animation: fadeInUp 0.8s ease forwards;
}

.slide-in-left {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.rotate-in {
    opacity: 1;
    transform: rotate(0) scale(1);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 3D Cards ========== */
.card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d:hover {
    transform: translateZ(20px) rotateX(5deg) rotateY(5deg);
}

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

/* ========== Floating Elements ========== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

.float-animation-delay-1 {
    animation: float 3s ease-in-out infinite;
    animation-delay: 0.5s;
}

.float-animation-delay-2 {
    animation: float 3s ease-in-out infinite;
    animation-delay: 1s;
}

/* ========== Pulse Animations ========== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

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

/* ========== Glow Effects ========== */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 196, 112, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 196, 112, 0.6), 
                    0 0 60px rgba(0, 196, 112, 0.4);
    }
}

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}

/* ========== Chart Containers ========== */
.chart-container {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00C470, #00A35A, #00C470);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.chart-container:hover::before {
    opacity: 0.5;
}

/* ========== Price Ticker ========== */
.price-ticker {
    background: rgba(0, 196, 112, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 25px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(0, 196, 112, 0.3);
    transition: all 0.3s ease;
}

.price-ticker:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 196, 112, 0.3);
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    color: #00C470;
    font-family: 'Courier New', monospace;
}

.price-change {
    font-size: 14px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
}

.price-change.positive {
    background: rgba(0, 196, 112, 0.2);
    color: #00C470;
}

.price-change.negative {
    background: rgba(255, 99, 121, 0.2);
    color: rgba(255, 255, 255, 0.4);
}

/* ========== 3D Background Elements ========== */
.bg-3d-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

#bg-3d-canvas {
    width: 100%;
    height: 100%;
}

/* ========== Parallax Sections ========== */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    will-change: transform;
}

/* ========== Trading Dashboard Cards ========== */
.trading-card {
    background: linear-gradient(135deg, rgba(0, 196, 112, 0.1) 0%, rgba(0, 163, 90, 0.05) 100%);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(0, 196, 112, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.trading-card:hover::before {
    left: 100%;
}

.trading-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 196, 112, 0.3);
}

/* ========== Number Counter Animation ========== */
.counter-number {
    font-size: 48px;
    font-weight: 700;
    color: #00C470;
    font-family: 'Arial', sans-serif;
    text-shadow: 0 0 20px rgba(0, 196, 112, 0.5);
}

/* ========== Gradient Text ========== */
.gradient-text {
    background: linear-gradient(90deg, #00C470 0%, #00A35A 50%, #00C470 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

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

/* ========== Market Overview Grid ========== */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.market-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.market-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 196, 112, 0.5);
    transform: translateY(-5px);
}

/* ========== Animated Icons ========== */
@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.rotate-icon {
    animation: rotate360 20s linear infinite;
}

/* ========== Particle Effect ========== */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00C470;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
}

/* ========== Live Indicator ========== */
@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #00C470;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #00C470;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px #00C470;
}

/* ========== Candlestick Chart Styles ========== */
.candlestick-container {
    width: 100%;
    height: 400px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 768px) {
    .counter-number {
        font-size: 32px;
    }
    
    .market-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .candlestick-container {
        height: 300px;
    }
}

/* ========== Smooth Scroll ========== */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ========== Section Transitions ========== */
section {
    position: relative;
    will-change: transform, opacity;
}

/* ========== Data Streaming Effect ========== */
@keyframes dataStream {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100px);
        opacity: 0;
    }
}

.data-stream {
    position: absolute;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    color: #00C470;
    opacity: 0.3;
    animation: dataStream 3s linear infinite;
}

