/* Time Distortion CSS Framework
 * Adds temporal visual effects for task aging and glassmorphism
 */

/* Fade Old Tasks - Tasks older than 2 days */
.time-fade-old {
    opacity: 0.7;
    filter: grayscale(20%);
    transition: all 0.5s ease-out;
}

.time-fade-old:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* Glassmorphism Base */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Temporal Pulse - Current active task */
.temporal-pulse {
    animation: temporal-pulse-animation 2s ease-in-out infinite;
}

@keyframes temporal-pulse-animation {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
}

/* Context Wobble - Context switch indicator */
.context-wobble {
    animation: context-wobble-animation 0.5s ease-out;
}

@keyframes context-wobble-animation {
    0% { transform: scale(0.95) translateX(-5px); opacity: 0; }
    50% { transform: scale(1.02) translateX(3px); }
    100% { transform: scale(1) translateX(0); opacity: 1; }
}

/* Memory Fade In - Smooth reveal */
.memory-fade-in {
    animation: memory-fade-in-animation 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes memory-fade-in-animation {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Decision Flash - When decision is captured */
.decision-flash {
    animation: decision-flash-animation 0.8s ease-out;
}

@keyframes decision-flash-animation {
    0% {
        background-color: rgba(99, 102, 241, 0.3);
        transform: scale(1.02);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

/* Idle Drift - Visual indicator for idle time */
.idle-drift {
    animation: idle-drift-animation 3s ease-in-out infinite;
}

@keyframes idle-drift-animation {
    0%, 100% { opacity: 0.5; transform: translateX(0); }
    50% { opacity: 0.8; transform: translateX(3px); }
}

/* Time Stretch - Expand effect for zoom */
.time-stretch {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.time-stretch:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Ghost Panel - Very old/faded tasks */
.ghost-panel {
    opacity: 0.4;
    transition: opacity 0.5s ease;
}

.ghost-panel:hover {
    opacity: 0.7;
}

/* Neon Glow - For important items */
.neon-glow {
    box-shadow: 0 0 5px rgba(99, 102, 241, 0.5),
                0 0 10px rgba(99, 102, 241, 0.3),
                0 0 20px rgba(99, 102, 241, 0.1);
}

.neon-glow-green {
    box-shadow: 0 0 5px rgba(34, 197, 94, 0.5),
                0 0 10px rgba(34, 197, 94, 0.3),
                0 0 20px rgba(34, 197, 94, 0.1);
}

.neon-glow-red {
    box-shadow: 0 0 5px rgba(239, 68, 68, 0.5),
                0 0 10px rgba(239, 68, 68, 0.3),
                0 0 20px rgba(239, 68, 68, 0.1);
}

/* Time Gradient Overlay */
.time-gradient {
    background: linear-gradient(
        180deg,
        rgba(99, 102, 241, 0.1) 0%,
        rgba(139, 92, 246, 0.05) 50%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(100, 116, 139, 0.1) 0%,
        rgba(100, 116, 139, 0.2) 50%,
        rgba(100, 116, 139, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

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

.ripple::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: scale(0);
    opacity: 0;
    transition: transform 0.5s, opacity 0.5s;
}

.ripple:active::after {
    transform: scale(2);
    opacity: 1;
    transition: transform 0s, opacity 0s;
}
