@keyframes ExpandingLineAnimation {
    0% {
        opacity: 0;
    }
    55% {
        opacity: 1;
        width: 300px;
    }
    80% {
        opacity: 1;
    }
    90% {
        opacity: 0;
        width: 300px;
    }
}

@keyframes DiscoveryMessage {
    0% {
        opacity: 0;
    }
    42% {
        opacity: 0;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes DiscoveryMessage2 {
    0% {
        opacity: 0;
    }
    65% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.discovered-message-container {
    position: fixed;
    top: 30%;
    left: 50.8%;
    transform: translate(-50%, -50%);
    z-index: 9999; /* Ensure it's on top of other elements */
    width: auto; /* Set width to auto to allow content to determine the width */
    max-width: 80%; /* Set a maximum width to prevent it from occupying the entire screen */
    text-align: center; /* Center align the content */
}

html.phone-optimised .discovered-message-container,
body.phone-optimised .discovered-message-container {
    top: calc(env(safe-area-inset-top, 0px) + 16px);
    left: 50%;
    width: min(300px, calc(100vw - 28px));
    height: 68px;
    max-width: none;
    transform: translateX(-50%);
}

.expanding-line {
    height: 2px;
    width: 3px;
    background: #fff;
    position: absolute;
    bottom: calc(80%); /* Adjust the position to place the line above the discovered message */
    top: auto; /* Reset the top property */
    left: 50.8%;
    transform: translateX(-50%);
    border-bottom: 1px solid #fff;
    animation: ExpandingLineAnimation 7s ease-out forwards;
    animation-fill-mode: forwards;
    opacity: 0; /* Initially hidden */
    animation-delay: 1.25s; /* Delay the start of the fade-in-and-expand animation by 1.25 seconds */
}

.discovered-message {
    color: rgba(255, 255, 255, 0.58);
    font-size: 16px; /* Adjust font size as needed */
    text-align: center;
    margin-top: 20px; /* Set the distance from the top */
    opacity: 0; /* Initially hidden */
    animation: DiscoveryMessage 8s ease-in-out forwards; /* Adjust duration to match fade-in and fade-out */
}


.discovered-message2 {
    color: white;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    position: absolute; /* Ensure absolute positioning */
    top: calc(50% - 55px); /* Adjust the value as needed to position it above the expanding line */
    left: 50%; /* Center horizontally */
    transform: translateX(-50%); /* Center horizontally */
    opacity: 0; /* Initially hidden */
    white-space: nowrap; /* Prevent text from wrapping */
    animation: DiscoveryMessage2 8s ease-in-out forwards;
}

html.phone-optimised .discovered-message-container .expanding-line,
body.phone-optimised .discovered-message-container .expanding-line {
    top: 35px;
    bottom: auto;
    left: 50%;
    max-width: 100%;
}

html.phone-optimised .discovered-message-container .discovered-message2,
body.phone-optimised .discovered-message-container .discovered-message2 {
    top: 0;
    left: 0;
    width: 100%;
    font-size: 24px;
    line-height: 28px;
    transform: none;
}

html.phone-optimised .discovered-message-container .discovered-message,
body.phone-optimised .discovered-message-container .discovered-message {
    position: absolute;
    top: 44px;
    left: 0;
    width: 100%;
    margin: 0;
    font-size: 16px;
    line-height: 20px;
}
