
* {
    transition-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
}

button,
.cta-button,
.cookie-accept,
.cookie-reject,
.filter-button,
input[type="submit"],
input[type="button"] {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
    cursor: pointer;
}

button::after,
.cta-button::after {
    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;
}

button:active::after,
.cta-button:active::after {
    width: 300px;
    height: 300px;
}

.product-card,
.feature,
.history-item {
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    will-change: transform, box-shadow;
}

a {
    transition: all 0.3s ease;
}

nav a {
    position: relative;
    display: inline-block;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(214, 69, 69, 0.2);
    transition: all 0.3s ease;
}

.input-error {
    animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
    border-color: #dc3545 !important;
}

.input-success {
    animation: pulse 0.4s ease;
    border-color: #28a745 !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out;
}

.animate-stagger-1 { animation-delay: 0.1s; }
.animate-stagger-2 { animation-delay: 0.2s; }
.animate-stagger-3 { animation-delay: 0.3s; }
.animate-stagger-4 { animation-delay: 0.4s; }
.animate-stagger-5 { animation-delay: 0.5s; }

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #b83636;
}

html {
    scroll-behavior: smooth;
}

img {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

img.lazy-loading {
    opacity: 0;
}

img.lazy-loaded {
    opacity: 1;
}

.modal {
    transition: opacity 0.3s ease;
}

.modal-content {
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    animation: scaleIn 0.3s ease-out;
}

input[type="checkbox"],
input[type="radio"] {
    transition: all 0.2s ease;
    cursor: pointer;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    animation: pulse 0.3s ease;
}

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 0.875rem;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 0px, #f8f8f8 40px, #f0f0f0 80px);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.notification {
    animation: slideInRight 0.5s ease-out;
}

.notification.hiding {
    animation: slideOutRight 0.5s ease-out;
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes progressBar {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}

.progress-bar {
    animation: progressBar 2s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

body {
    animation: fadeIn 0.5s ease-out;
}

header {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

footer {
    animation: fadeIn 0.8s ease-out;
}

.cookie-banner {
    animation: slideUpIn 0.5s ease-out;
}

@keyframes slideUpIn {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.will-animate {
    will-change: transform, opacity;
}

.animation-complete {
    will-change: auto;
}
