/* 기본 디자인 및 애니메이션 */
.TOP_slide {
    position: fixed;
    width: 55px;
    height: 55px;
    background: #ffffff; /* 기본 배경: 화이트 */
    border-radius: 5px; /* 둥근 사각형 */
    border: 1px solid #1A376D; /* 청색 외곽선 1px */
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    overflow: hidden;
    
    /* 나타나고 사라지는 효과 */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* PC 위치: 우측하단 20px */
@media screen and (min-width: 769px) {
    .TOP_slide { right: 40px; bottom: 120px; }
}

/* 모바일 위치: 우측 5px, 하단 100px */
@media screen and (max-width: 768px) {
    .TOP_slide {
        right: 5px !important;
        bottom: 150px !important;
        width: 60px;
        height: 60px;
    }
}

.TOP_slide.active { opacity: 1; visibility: visible; transform: translateY(0); }

.TOP_slide.fade-out {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 1s ease-in-out;
}

/* 위에서 아래로 채워지는 청색 배경 */
.TOP_slide .fill {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 0%;
    background: #1A376D; /* 채워지는 색상: 청색 */
    z-index: 1;
    transition: height 0.1s linear;
}

/* V자 아이콘 */
.TOP_slide .top-icon {
    position: relative;
    z-index: 10;
    font-size: 15px;
    color: #1A376D; /* 초기 색상: 청색 */
    transition: color 0.3s ease;
}

/* 배경이 50% 이상 차오르면 화살표를 화이트로 변경 */
.TOP_slide.over50 .top-icon {
    color: #ffffff !important;
}