/**
 * SilvForLife UX Enhancements - CSS Styles
 * Moderne Animationen und Wow-Effekte
 * @version 1.0.0
 */

/* ==================== GLOBALE ANIMATIONEN ==================== */

/* Fade In Animations - Premium & Subtle */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* ==================== RIPPLE EFFECT ==================== */

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.2);
    transform: scale(0);
    animation: ripple-animation 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

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

button, .button, a.button {
    position: relative;
    overflow: hidden;
}

/* ==================== CARD HOVER EFFECTS ==================== */

.product-card,
.feature-card,
.info-card {
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.card-hover-active {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.15) !important;
}

/* Gradient Overlay für Cards */
.card-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1) 0%, 
        rgba(139, 92, 246, 0.1) 50%,
        rgba(236, 72, 153, 0.1) 100%);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

/* Glow Effect on Hover */
.card-glow {
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.4), 
        rgba(139, 92, 246, 0.3));
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    filter: blur(20px);
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-glow:hover::before {
    opacity: 0.4;
}

/* Premium Scroll Progress */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 9999;
    pointer-events: none;
}

.scroll-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    width: 0%;
    transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.3);
}

/* ==================== FLOATING ACTION BUTTON ==================== */

.silvforlife-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.silvforlife-fab.fab-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.fab-main:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.6);
}

.fab-main svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab-menu {
    position: absolute;
    bottom: 75px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transform: scale(0);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.silvforlife-fab.fab-open .fab-menu {
    opacity: 1;
    transform: scale(1);
}

.fab-action {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 12px 16px;
    border-radius: 28px;
    color: white;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

.fab-action:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateX(-4px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
}

.fab-action svg {
    flex-shrink: 0;
}

.fab-label {
    font-weight: 500;
}

/* ==================== TOAST NOTIFICATIONS ==================== */

.silvforlife-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 400px;
    border-left: 4px solid;
}

.silvforlife-toast.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left-color: #34d399;
}

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

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

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

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-success .toast-icon { color: #34d399; }
.toast-error .toast-icon { color: #f87171; }
.toast-info .toast-icon { color: #3b82f6; }
.toast-warning .toast-icon { color: #fbbf24; }

.toast-message {
    flex: 1;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: rgba(255, 255, 255, 1);
}

/* ==================== SKELETON LOADER ==================== */

.loading-skeleton {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

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

.loaded {
    animation: fade-in-image 0.6s ease;
}

@keyframes fade-in-image {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== BUTTON ENHANCEMENTS ==================== */

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

.btn-glow {
    position: relative;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: inherit;
    opacity: 0;
    transform: translate(-50%, -50%);
    filter: blur(20px);
    transition: opacity 0.3s ease;
}

.btn-glow:hover::after {
    opacity: 0.7;
}

/* ==================== CUSTOM CURSOR ==================== */

.custom-cursor,
.cursor-dot {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.custom-cursor {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(59, 130, 246, 0.5);
    transform: translate(-50%, -50%);
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: rgba(59, 130, 246, 0.8);
    transform: translate(-50%, -50%);
}

.custom-cursor.cursor-hover {
    width: 60px;
    height: 60px;
    border-color: rgba(59, 130, 246, 0.8);
}

.cursor-dot.cursor-hover {
    width: 12px;
    height: 12px;
    background: rgba(59, 130, 246, 1);
}

/* Custom Cursor deaktiviert - Standard-Cursor wird verwendet */
/* @media (min-width: 1024px) {
    body {
        cursor: none;
    }
    a, button, .button, input, select, textarea {
        cursor: none;
    }
} */

/* ==================== PARALLAX ELEMENTS ==================== */

.parallax-element {
    will-change: transform;
}

/* ==================== MICRO-INTERACTIONS ==================== */

/* Smooth Scale on Hover */
.scale-hover {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Rotate on Hover */
.rotate-hover {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.pulse-animation {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce-animation {
    animation: bounce 1s ease-in-out infinite;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

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

/* ==================== GLASSMORPHISM ==================== */

.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ==================== GRADIENT TEXT ==================== */

.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== DATA ANIMATE CLASSES ==================== */

.animate-fade-in {
    animation: fade-in 0.6s ease forwards;
}

.animate-slide-up {
    animation: slide-up 0.8s ease forwards;
}

.animate-slide-down {
    animation: slide-down 0.8s ease forwards;
}

.animate-zoom-in {
    animation: zoom-in 0.6s ease forwards;
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoom-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .silvforlife-fab {
        bottom: 20px;
        right: 20px;
    }
    
    .fab-main {
        width: 50px;
        height: 50px;
    }
    
    .silvforlife-toast {
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .card-hover-active {
        transform: none !important;
    }
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */

/* GPU Acceleration */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .custom-cursor,
    .cursor-dot {
        display: none;
    }
}
