:root {
    --btt-width: 40px;
    --btt-height: 40px;
    --btt-bottom-offset: 20px;
    --btt-side-offset: 20px;
    --btt-background-color: rgba(0, 0, 0, 0.0);
    --btt-border-radius: 4px;
    --btt-padding: 0;
    --btt-focus-opacity: 0.9;
    --btt-hover-opacity: 1;
    --btt-z-index: 9999;
    --btt-color: rgba(0, 0, 0, 0.0);
    --btt-hover-color: rgba(0, 0, 0, 0.0);
    --btt-transition-duration: 200ms;
    --btt-animation-duration: 400ms; /* Slightly longer animation for smoother effect */
}

.btt-button {
    position: fixed;
    bottom: var(--btt-bottom-offset);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    border-radius: var(--btt-border-radius);
    padding: var(--btt-padding);
    box-sizing: border-box;
    z-index: var(--btt-z-index);
    width: auto;
    height: auto;
    background-color: var(--btt-background-color);
    will-change: transform, opacity;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
    outline: none;
    margin: 0;
    /* Add hardware acceleration for smoother animations */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Animation classes to replace framer-motion */
.btt-animate-in {
    animation: buttonFadeIn var(--btt-animation-duration) cubic-bezier(0.16, 1, 0.3, 1) forwards;
    /* Use a spring-like cubic-bezier that mimics framer-motion's spring */
}

.btt-animate-out {
    animation: buttonFadeOut var(--btt-animation-duration) cubic-bezier(0.33, 1, 0.68, 1) forwards;
    /* Use a smoother ease-out curve for exiting */
}

@keyframes buttonFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px) translateZ(0);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

@keyframes buttonFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
    100% {
        opacity: 0;
        transform: translateY(20px) translateZ(0);
    }
}

.btt-button[data-position="bottom-right"] {
    right: var(--btt-side-offset);
}

.btt-button[data-position="bottom-left"] {
    left: var(--btt-side-offset);
}

.btt-button[data-position="top-right"] {
    right: var(--btt-side-offset);
    bottom: auto;
    top: var(--btt-bottom-offset);
}

.btt-button[data-position="top-left"] {
    left: var(--btt-side-offset);
    bottom: auto;
    top: var(--btt-bottom-offset);
}

.btt-icon {
    width: var(--btt-width, 24px);
    height: var(--btt-height, 24px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Hover Effect */
@media (hover: hover) {
    .btt-button:hover {
        opacity: var(--btt-hover-opacity);
        transform: translateY(-2px) translateZ(0);
        transition: opacity 150ms cubic-bezier(0.33, 1, 0.68, 1),
                    transform 150ms cubic-bezier(0.33, 1, 0.68, 1);
    }
}

/* Focus styles for accessibility */
.btt-button:focus {
    outline: 0 solid currentColor;
    outline-offset: 0;
    opacity: var(--btt-focus-opacity);
    transition: opacity 150ms cubic-bezier(0.33, 1, 0.68, 1);
}

.btt-btn-color {
    color: var(--btt-color, #000000);
    transition: color var(--btt-transition-duration, 200ms) cubic-bezier(0.16, 1, 0.3, 1);
}

.btt-btn-color:hover {
    color: var(--btt-hover-color, #000000);
}
.aIuC6oUHkkKkEwc12itb{height:var(--btt-progress-bar-container-height, 5px);background-color:var(--btt-progress-bar-container-color, #e0e0e0);position:fixed;top:0;left:0;right:0;z-index:var(--btt-progress-bar-container-z-index, 999999)}.MSqtrcUnYPdZp5f0f25r{height:var(--btt-progress-bar-height, var(--btt-progress-bar-container-height, 5px));background-color:var(--btt-progress-bar-color, #4caf50);width:var(--btt-progress-bar-width, 0);transition:var(--btt-progress-bar-transition, width 0.1s ease-in-out)}
#modern-back-to-top-button{text-align:center}
