.back-to-top {
    position: fixed;
    right: 8px;
    left: auto;
    top: auto;
    bottom: calc(150px + env(safe-area-inset-bottom, 0px));
    z-index: 10001;
    width: 52px;
    min-height: 52px;
    padding: 8px 6px 6px;
    border: 1px solid #151515;
    border-radius: 10px;
    background: #39ff14;
    color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(57, 255, 20, 0.35);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.2s ease;
    font-family: Arial, sans-serif;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top i {
    font-size: 18px;
    line-height: 1;
}

.back-to-top span {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
}

.back-to-top:hover {
    background: #32e612;
}

.back-to-top:active {
    transform: translateY(1px);
}

.back-to-top.show:active {
    transform: translateY(1px);
}

@media (min-width: 769px) {
    .back-to-top {
        right: 16px;
        bottom: auto;
        top: 58%;
        transform: translateY(calc(-50% + 12px));
    }

    .back-to-top.show {
        transform: translateY(-50%);
    }

    .back-to-top.show:active {
        transform: translateY(calc(-50% + 1px));
    }

    .back-to-top {
        width: 56px;
        min-height: 56px;
    }

    .back-to-top i {
        font-size: 20px;
    }

    .back-to-top span {
        font-size: 11px;
    }
}
