/* Enhanced Market Analysis Section */
#testimonials {
    position: relative;
    overflow: hidden;
}

.tm-testimonials-content {
    position: relative;
    z-index: 2;
}

/* New Layout Styles */
.market-analysis-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.analysis-content {
    text-align: left;
}

.analysis-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animated Stats */
.stats-container {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Enhanced Button Styles */
.tm-btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    min-width: 280px;
}

.tm-btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
    color: white;
    text-decoration: none;
}

/* Button Animations */
.tm-btn-primary::before {
    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.8s;
}

.tm-btn-primary:hover::before {
    left: 100%;
}

/* AI Icon Animation */
.ai-icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.tm-btn-primary:hover .ai-icon {
    transform: rotate(15deg) scale(1.2);
}

/* Pulsing Effect */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    }
    50% {
        box-shadow: 0 0 30px rgba(102, 126, 234, 0.9), 0 0 40px rgba(102, 126, 234, 0.6);
    }
    100% {
        box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    }
}

.tm-btn-primary.pulse {
    animation: pulse-glow 2s infinite;
}

/* Data Visualization Graphic */
.data-graphic {
    width: 100%;
    max-width: 400px;
    height: 200px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.graphic-line {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #667eea, transparent);
    animation: line-glow 3s infinite;
}

@keyframes line-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .market-analysis-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .analysis-content {
        text-align: center;
    }
    
    .stats-container {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Market Data Animation Styles */
.analysis-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.data-graphic {
    width: 100%;
    max-width: 500px;
    height: 300px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
}

/* Animated Market Chart */
.market-chart {
    width: 100%;
    height: 100%;
    position: relative;
}

.chart-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    opacity: 0.3;
}

.grid-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
}

.grid-line.vertical {
    width: 1px;
    height: 100%;
}

.grid-line.horizontal {
    width: 100%;
    height: 1px;
}

/* Animated Price Line */
.price-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80%;
    stroke: #667eea;
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Data Points Animation */
.data-point {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px #667eea;
    animation: point-pulse 2s infinite;
}

@keyframes point-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.7;
    }
}

/* Volume Bars */
.volume-bars {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.volume-bar {
    flex: 1;
    background: linear-gradient(to top, #667eea, #764ba2);
    border-radius: 2px 2px 0 0;
    animation: volume-grow 3s ease-in-out infinite;
    animation-delay: calc(var(--delay, 0) * 0.2s);
}

@keyframes volume-grow {
    0%, 100% {
        height: 10%;
    }
    50% {
        height: 90%;
    }
}

/* Live Data Indicator */
.live-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4ade80;
    font-size: 0.8rem;
    font-weight: 600;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: live-pulse 1.5s infinite;
}

@keyframes live-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

/* Market Metrics */
.market-metrics {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    gap: 20px;
}

.metric {
    color: white;
    font-size: 0.8rem;
}

.metric-value {
    font-weight: 600;
    color: #4ade80;
}

.metric.negative .metric-value {
    color: #f87171;
}

/* Price Fluctuation Animation */
.price-fluctuation {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #4ade80;
    font-weight: 600;
    animation: price-bounce 2s infinite;
}

@keyframes price-bounce {
    0%, 100% {
        transform: translateY(-50%);
    }
    50% {
        transform: translateY(-60%);
    }
}

/* Trading Activity Dots */
.trading-dots {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.trading-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(102, 126, 234, 0.6);
    border-radius: 50%;
    animation: trading-float 4s linear infinite;
    animation-delay: calc(var(--delay, 0) * 0.5s);
}

@keyframes trading-float {
    0% {
        transform: translateY(100%) scale(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
        transform: translateY(50%) scale(1);
    }
    100% {
        transform: translateY(0) scale(0);
        opacity: 0;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .data-graphic {
        height: 250px;
        max-width: 100%;
    }
    
    .market-metrics {
        flex-direction: column;
        gap: 5px;
    }
}