@-webkit-keyframes come-in {
    0% {
        -webkit-transform: translateY(100px);
        transform: translateY(100px);
        opacity: 0;
    }
    30% {
        -webkit-transform: translateX(-50px) scale(0.4);
        transform: translateX(-50px) scale(0.4);
    }
    70% {
        -webkit-transform: translateX(0px) scale(1.2);
        transform: translateX(0px) scale(1.2);
    }
    100% {
        -webkit-transform: translateY(0px) scale(1);
        transform: translateY(0px) scale(1);
        opacity: 1;
    }
}

@keyframes come-in {
    0% {
        -webkit-transform: translateY(100px);
        transform: translateY(100px);
        opacity: 0;
    }
    30% {
        -webkit-transform: translateX(-50px) scale(0.4);
        transform: translateX(-50px) scale(0.4);
    }
    70% {
        -webkit-transform: translateX(0px) scale(1.2);
        transform: translateX(0px) scale(1.2);
    }
    100% {
        -webkit-transform: translateY(0px) scale(1);
        transform: translateY(0px) scale(1);
        opacity: 1;
    }
}

.floating-container {
    position: fixed;
    width: 70px;
    height: 68px; /* 기본 높이 */
    bottom: 110px;
    right: 17px;
    margin: 0;
    z-index: 9999;
    transition: height 0.3s ease-out; /* 높이 변화 애니메이션 추가 */
    display: none;
    will-change: transform;
}

/* is-active 클래스가 있을 때 메뉴 열림 */
.floating-container.is-active {
    height: 230px;
}

.floating-container.is-active .floating-button {
    box-shadow: 0 10px 25px rgba(44, 179, 240, 0.6);
    -webkit-transform: translateY(5px);
    transform: translateY(5px);
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
}

.floating-container.is-active .element-container .float-element:nth-child(1) {
    -webkit-animation: come-in 0.4s forwards 0.2s;
    animation: come-in 0.4s forwards 0.2s;
}

.floating-container.is-active .element-container .float-element:nth-child(2) {
    -webkit-animation: come-in 0.4s forwards 0.4s;
    animation: come-in 0.4s forwards 0.4s;
}

/* .floating-container:hover 대신 .is-active 클래스 사용 */
/* .floating-container:hover는 제거되거나, is-active와 함께 동작하도록 수정될 수 있습니다. */
/* 데스크탑 hover도 살리려면 is-active와 hover 규칙을 함께 정의해야 합니다. */
/* 여기서는 클릭/탭 기반으로 통일합니다. */

.floating-container .floating-button {
    position: absolute;
    width: 65px;
    height: 65px;
    background: rgba(44, 179, 240, 0.5);
    bottom: 0;
    border-radius: 50%;
    left: 0;
    right: 0;
    margin: auto;
    color: white;
    line-height: 65px;
    text-align: center;
    font-size: 23px;
    z-index: 9999;
    box-shadow: 0 10px 25px -5px rgba(44, 179, 240, 0.6);
    cursor: pointer;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
}

.floating-container .element-container {
    position: absolute; /* 이 부분이 중요: float-element가 제대로 배치되도록 */
    bottom: 70px; /* 버튼 위로 올라오도록 조정 */
    left: 0;
    right: 0;
    margin: auto;
    width: 100%; /* 부모의 너비에 맞춤 */
    display: flex; /* 요소들을 수직으로 배치 */
    flex-direction: column;
    align-items: center; /* 가운데 정렬 */
    height: auto;
    z-index: 5;
}

.floating-container .float-element {
    cursor: pointer;
    position: relative;
    display: block;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin: 15px auto; /* 중앙 정렬 */
    color: white;
    font-weight: 500;
    text-align: center;
    line-height: 50px;
    z-index: 0;
    opacity: 0; /* 기본적으로 숨김 */
    -webkit-transform: translateY(100px); /* 기본 위치 */
    transform: translateY(100px);
    transition: opacity 0.4s, transform 0.4s; /* 부드러운 전환 */
    pointer-events: none;
}

.floating-container.is-active .float-element {
    pointer-events: auto; /* 👉 활성화됐을 때만 클릭 가능 */
}

.floating-container .float-element .material-symbols-outlined {
    vertical-align: middle;
    font-size: 24px; /* 아이콘 크기 조정 */
}

.floating-container .float-element:nth-child(1) {
    background: #FEE500;
    box-shadow: 0 20px 20px -10px rgba(66, 165, 245, 0.5);
}

.floating-container .float-element:nth-child(2) {
    background: #4CAF50;
    box-shadow: 0 20px 20px -10px rgba(76, 175, 80, 0.5);
}

/* 토스트 메시지 스타일 */
#toast-message {
    display: none; /* 초기에는 숨김 */
    position: fixed;
    bottom: 100px; /* 플로팅 버튼 위쪽에 위치 */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    white-space: nowrap; /* 텍스트가 줄바꿈되지 않도록 */
}