/* INNOVAI Advanced Animations & Effects */
/* Animate On Scroll (AOS) Custom Implementation */

/* AOS Base Styles */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: 0.6s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: none;
}

/* Fade Animations */
[data-aos="fade-up"] {
    transform: translateY(30px);
}

[data-aos="fade-down"] {
    transform: translateY(-30px);
}

[data-aos="fade-left"] {
    transform: translateX(30px);
}

[data-aos="fade-right"] {
    transform: translateX(-30px);
}

[data-aos="fade-in"] {
    opacity: 0;
}

/* Scale Animations */
[data-aos="zoom-in"] {
    transform: scale(0.8);
}

[data-aos="zoom-out"] {
    transform: scale(1.2);
}

/* Flip Animations */
[data-aos="flip-left"] {
    transform: perspective(2500px) rotateY(-100deg);
}

[data-aos="flip-right"] {
    transform: perspective(2500px) rotateY(100deg);
}

/* Slide Animations */
[data-aos="slide-up"] {
    transform: translateY(100%);
}

[data-aos="slide-down"] {
    transform: translateY(-100%);
}

/* Advanced Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hover-glow {
    position: relative;
    transition: all 0.3s ease;
}

.hover-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, #667eea, #764ba2);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
    filter: blur(20px);
}

.hover-glow:hover::before {
    opacity: 0.7;
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Loading Skeletons */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: 16px;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-card {
    height: 200px;
    border-radius: 12px;
}

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

/* Dark Mode Variables */
:root {
    --bg-primary-light: #ffffff;
    --bg-secondary-light: #f8fafc;
    --text-primary-light: #1e293b;
    --text-secondary-light: #64748b;
    --border-light: #e2e8f0;
    
    --bg-primary-dark: #0f172a;
    --bg-secondary-dark: #1e293b;
    --text-primary-dark: #f1f5f9;
    --text-secondary-dark: #cbd5e1;
    --border-dark: #334155;
}

/* Dark Mode Styles */
[data-theme="dark"] {
    --bg-primary: var(--bg-primary-dark);
    --bg-secondary: var(--bg-secondary-dark);
    --text-primary: var(--text-primary-dark);
    --text-secondary: var(--text-secondary-dark);
    --border-color: var(--border-dark);
}

[data-theme="light"] {
    --bg-primary: var(--bg-primary-light);
    --bg-secondary: var(--bg-secondary-light);
    --text-primary: var(--text-primary-light);
    --text-secondary: var(--text-secondary-light);
    --border-color: var(--border-light);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode specific adjustments */
[data-theme="dark"] .header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom-color: var(--border-dark);
}

[data-theme="dark"] .dropdown-menu {
    background: var(--bg-secondary-dark);
    border-color: var(--border-dark);
}

[data-theme="dark"] .btn-icon {
    background: var(--bg-secondary-dark);
    color: var(--text-secondary-dark);
}

[data-theme="dark"] .search-box {
    background: var(--bg-secondary-dark);
    border-color: var(--border-dark);
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}

/* Theme Toggle Button */
.theme-toggle {
    position: relative;
    overflow: hidden;
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle .fa-moon {
    transform: rotate(180deg);
}

[data-theme="light"] .theme-toggle .fa-sun {
    transform: rotate(0deg);
}

/* Typing Effect */
.typing-effect {
    overflow: hidden;
    border-right: 2px solid;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: currentColor; }
}

/* Micro Animations */
.pulse {
    animation: pulse 2s infinite;
}

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

.bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0);
    }
    70% {
        transform: translate3d(0, -15px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

.shake {
    animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    transform: translateX(400px);
    animation: slideInRight 0.3s ease forwards;
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.info {
    border-left-color: #3b82f6;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.toast.success .toast-icon {
    background: #10b981;
}

.toast.error .toast-icon {
    background: #ef4444;
}

.toast.info .toast-icon {
    background: #3b82f6;
}

.toast.warning .toast-icon {
    background: #f59e0b;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.toast-message {
    font-size: 14px;
    color: var(--text-secondary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.toast-close:hover {
    background: rgba(0,0,0,0.1);
}

@keyframes slideInRight {
    to {
        transform: translateX(0);
    }
}

.toast.removing {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-content {
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-dark);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--bg-dark);
}

.tooltip:hover .tooltip-content {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    [data-aos] {
        transition-duration: 0.4s;
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
    }
    
    .toast {
        min-width: auto;
    }
    
    .tooltip-content {
        font-size: 12px;
        padding: 6px 10px;
    }
}
