/* Tech Style Animations CSS */

/* Base Animation Classes */
.animate-in {
    animation: slideInUp 0.6s ease-out forwards;
}

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

.animate-slide-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

/* Keyframe Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Tech-specific Animations */
@keyframes techGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
    }
}

@keyframes techPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes techFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

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

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

@keyframes techBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

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

@keyframes techZoomIn {
    from {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes techFlipIn {
    from {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
    40% {
        transform: perspective(400px) rotateY(-20deg);
    }
    60% {
        transform: perspective(400px) rotateY(10deg);
    }
    80% {
        transform: perspective(400px) rotateY(-5deg);
    }
    to {
        transform: perspective(400px) rotateY(0deg);
        opacity: 1;
    }
}

/* Hover Animations */
.tech-hover-glow:hover {
    animation: techGlow 2s ease-in-out infinite;
}

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

.tech-hover-spin:hover {
    animation: techSpin 1s linear infinite;
}

.tech-hover-bounce:hover {
    animation: techBounce 1s ease-in-out;
}

.tech-hover-shake:hover {
    animation: techShake 0.5s ease-in-out;
}

.tech-hover-zoom:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.tech-hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
}

/* Loading Animations */
.tech-loading {
    position: relative;
    overflow: hidden;
}

.tech-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    animation: techSlideIn 1.5s ease-in-out infinite;
}

.tech-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 212, 255, 0.3);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: techSpin 1s linear infinite;
}

.tech-dots {
    display: inline-block;
}

.tech-dots::after {
    content: '';
    animation: techDots 1.5s steps(4, end) infinite;
}

@keyframes techDots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

/* Particle Effects */
.tech-particles {
    position: relative;
    overflow: hidden;
}

.tech-particles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(0, 212, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(0, 212, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(0, 212, 255, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(0, 212, 255, 0.3), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
    animation: techParticles 20s linear infinite;
    pointer-events: none;
}

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

/* Matrix Effect */
.tech-matrix {
    position: relative;
    overflow: hidden;
}

.tech-matrix::before {
    content: '01010101010101010101010101010101010101010101010101010101010101010101010101010101';
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    color: rgba(0, 212, 255, 0.1);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.2;
    word-break: break-all;
    animation: techMatrix 10s linear infinite;
    pointer-events: none;
}

@keyframes techMatrix {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(200%);
    }
}

/* Glitch Effect */
.tech-glitch {
    position: relative;
    display: inline-block;
}

.tech-glitch::before,
.tech-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.tech-glitch::before {
    animation: techGlitch1 0.5s infinite;
    color: rgba(255, 0, 0, 0.7);
    z-index: -1;
}

.tech-glitch::after {
    animation: techGlitch2 0.5s infinite;
    color: rgba(0, 255, 255, 0.7);
    z-index: -2;
}

@keyframes techGlitch1 {
    0%, 14%, 15%, 49%, 50%, 99%, 100% {
        transform: translate(0);
    }
    15%, 49% {
        transform: translate(-2px, 2px);
    }
}

@keyframes techGlitch2 {
    0%, 20%, 21%, 62%, 63%, 99%, 100% {
        transform: translate(0);
    }
    21%, 62% {
        transform: translate(2px, -2px);
    }
}

/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Additional Animation Styles for JavaScript Integration */

/* Fade In Animation */
.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.fade-in.visible {
    opacity: 1;
}

/* Slide In Animation */
.slide-in {
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.6s ease-out;
}

.slide-in.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Scroll Animation */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

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

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    background: var(--background-secondary);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease-out;
}

.notification-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.notification-message {
    color: var(--text-primary);
    flex: 1;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 1rem;
}

.notification-close:hover {
    color: var(--text-primary);
}

.notification-info {
    border-left: 4px solid var(--primary-color);
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-warning {
    border-left: 4px solid #f59e0b;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

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