/* 상단으로 가기 버튼 */
.top-button {
    position: fixed !important;
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    background-color: var(--main-color) !important;
    
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    transition: transform 0.4s ease;
    z-index: 999999 !important;
    transform:translateY(300px);
}
.top-button.on{
    transform:translateY(0);
}

.top-button:hover {
    background-color: #0d3f6b !important;
    transform: translateY(-2px);
    -webkit-transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.top-button.show {
    transform: translateY(0) !important;
    -webkit-transform: translateY(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 화살표 아이콘 */
.top-button-icon {
    font-weight: bold;
    line-height: 1;
    pointer-events: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: block !important;
    color: white !important;
    line-height: 0;
}

/* SVG 스타일 */
.top-button-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    margin: 0 auto !important;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .top-button {
        bottom: 20px !important;
        right: 20px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
        z-index: 999999 !important;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        -webkit-transform: translateY(80px);
        -webkit-transition: -webkit-transform 0.4s ease;
        position: fixed !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .top-button.show {
        transform: translateY(0) !important;
        -webkit-transform: translateY(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .top-button:active {
        background-color: #0d3f6b !important;
        transform: translateY(0) scale(0.95);
        -webkit-transform: translateY(0) scale(0.95);
    }
}

/* 매우 작은 화면 */
@media (max-width: 480px) {
    .top-button {
        bottom: 15px !important;
        right: 15px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
        z-index: 999999 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* iOS Safari 전용 대응 */
@supports (-webkit-touch-callout: none) {
    .top-button {
        position: fixed !important;
        bottom: 30px !important;
        right: 30px !important;
        width: 50px !important;
        height: 50px !important;
        z-index: 999999 !important;
        -webkit-transform: translateY(80px);
        -webkit-transition: -webkit-transform 0.4s ease;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        background-color: #1357A0 !important;
        color: white !important;
    }
    
    .top-button.show {
        -webkit-transform: translateY(0) !important;
        transform: translateY(0) !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    @media (max-width: 768px) {
        .top-button {
            bottom: 20px !important;
            right: 20px !important;
        }
    }
    
    @media (max-width: 480px) {
        .top-button {
            bottom: 15px !important;
            right: 15px !important;
            width: 45px !important;
            height: 45px !important;
        }
    }
} 