/* SENTINEL AI — ANIMATIONS */
/* Page transitions */
.page {
    animation: pageFadeIn 0.4s ease;
}

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

/* Card hover lift */
.card {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.card:hover {
    transform: translateY(-2px);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

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

/* Data update flash */
.data-update {
    animation: dataFlash 0.5s ease;
}

@keyframes dataFlash {
    0% { color: var(--accent-cyan); text-shadow: 0 0 10px rgba(0, 245, 212, 0.5); }
    100% { color: inherit; text-shadow: none; }
}

/* Price tick animation */
.price-tick-up {
    animation: tickUp 0.3s ease;
}

.price-tick-down {
    animation: tickDown 0.3s ease;
}

@keyframes tickUp {
    0% { color: var(--color-positive); transform: scale(1.05); }
    100% { color: inherit; transform: scale(1); }
}

@keyframes tickDown {
    0% { color: var(--color-negative); transform: scale(1.05); }
    100% { color: inherit; transform: scale(1); }
}

/* Pulse animation for live indicators */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Glow effect */
.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px rgba(0, 245, 212, 0.2); }
    to { box-shadow: 0 0 20px rgba(0, 245, 212, 0.4), 0 0 40px rgba(0, 245, 212, 0.1); }
}

/* Slide in from right */
.slide-in-right {
    animation: slideInRight 0.4s ease;
}

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

/* Fade in scale */
.fade-in-scale {
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Shake for error */
.shake {
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Rotate for loading */
.rotate {
    animation: rotate 1s linear infinite;
}

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

/* Number count up */
.count-up {
    animation: countUp 0.5s ease-out;
}

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

/* Chart draw animation */
.chart-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: chartDraw 2s ease forwards;
}

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

/* Bar grow animation */
.bar-grow {
    animation: barGrow 0.6s ease-out forwards;
    transform-origin: bottom;
}

@keyframes barGrow {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

/* Notification slide */
.notification-slide-in {
    animation: notificationSlideIn 0.3s ease;
}

@keyframes notificationSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* Modal backdrop fade */
.modal-backdrop-fade {
    animation: modalBackdropFade 0.3s ease;
}

@keyframes modalBackdropFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tooltip fade */
.tooltip-fade {
    animation: tooltipFade 0.2s ease;
}

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

/* Gradient border animation */
.gradient-border {
    position: relative;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius-lg);
    padding: 1px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-pink), var(--accent-cyan));
    background-size: 300% 300%;
    animation: gradientBorder 4s ease infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

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

/* Neon text flicker */
.neon-text {
    animation: neonFlicker 3s ease-in-out infinite alternate;
}

@keyframes neonFlicker {
    0%, 100% { text-shadow: 0 0 5px rgba(0, 245, 212, 0.5), 0 0 10px rgba(0, 245, 212, 0.3); }
    50% { text-shadow: 0 0 2px rgba(0, 245, 212, 0.3), 0 0 5px rgba(0, 245, 212, 0.1); }
}

/* Scanline effect */
.scanlines::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    border-radius: inherit;
}
