@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.connection-status {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.connection-status.online {
    background: rgba(72, 187, 120, 0.9);
    color: white;
}

.connection-status.offline {
    background: rgba(245, 101, 101, 0.9);
    color: white;
    animation: connectionPulse 2s infinite;
}

.card {
    animation: cardSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    60% {
        opacity: 0.8;
        transform: translateY(-5px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#chat-box>div.alert {
    opacity: 0;
    animation: messagePopIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: translateY(20px) scale(0.9);
}

@keyframes messagePopIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    60% {
        opacity: 0.8;
        transform: translateY(-3px) scale(1.05);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.chat-input button.btn-pressed {
    transform: scale(0.85);
    transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #6610f2);
    color: white;
    border: none;
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.fab:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 15px 35px rgba(13, 110, 253, 0.4);
}

.fab:active {
    transform: scale(0.95);
}

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

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

    100% {
        background-position: 200% 0;
    }
}

.form-floating {
    position: relative;
}

.form-floating input:focus~label,
.form-floating input:not(:placeholder-shown)~label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: #0d6efd;
}

.form-floating label {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    animation: notificationSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

@keyframes notificationSlideIn {
    0% {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Ripple effect created by JS (ui-enhancements.js) */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    transform: scale(0);
    animation: rippleAnim 0.6s ease-out forwards;
    pointer-events: none;
    z-index: 1;
}

@keyframes rippleAnim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.interactive {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.interactive:active {
    transform: translateY(0) scale(0.98);
}

.focus-ring:focus-visible {
    outline: 3px solid rgba(13, 110, 253, 0.5);
    outline-offset: 2px;
    border-radius: 8px;
}

@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(-45deg, #1a1a1a, #2d2d2d, #1e1e1e, #252525);
    }

    .loading-skeleton {
        background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
        background-size: 200% 100%;
    }
}

@media (max-width: 768px) {
    .fab {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .notification {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        padding: 0.75rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.1ms !important;
    }
}