@font-face {
    font-family: 'CircularXX';
    src: url('fonts/CircularXXTT-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'CircularXX';
    src: url('fonts/CircularXXTT-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: 'CircularXX', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

body {
    background-color: #090E13;
    background-image: url("https://static.rootapp.com/rootapp.gg/assets/RootBrandedBackground.svg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    box-sizing: border-box;
    overflow: hidden;
    padding: 1.5rem;
}

@media (min-width: 37.5rem) {
    body {
        justify-content: center;
    }
}

@media (max-width: 37.5rem) {
    body {
        justify-content: flex-start;
        padding-top: 5rem;
    }
}

.logo {
    position: absolute;
    top: 2rem;
    left: 2.5rem;
    width: 5.26rem;       /* 84.21px */
    height: 2rem;         /* 32px */
    opacity: 0.95;
}

.content-box {
    background-color: #0D1521;
    border: 0.03125rem solid #242C36;   /* 0.5px */
    border-radius: 0.75rem;             /* 12px */
    padding: 2rem;
    max-width: calc(100% - 3rem);
    min-width: min(calc(100% - 3rem), 25rem);
    backdrop-filter: blur(0.25rem);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.45),
    0 0.125rem 0.5rem rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.invite-text {
    text-align: center;
    font-weight: 400;                   /* Regular */
    font-size: 1.25rem;                 /* 20px */
    line-height: 1.25rem;
    color: #F2F2F2;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.banner,
.banner-fallback {
    width: 4.375rem;                    /* 70px */
    height: 4.375rem;                   /* 70px */
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;              /* 8px before community name */
    object-fit: cover;
    display: block;
}

.banner-fallback {
    background-color: #49d6ac;
}

h1 {
    font-weight: 500;                   /* Medium */
    font-size: 1.5rem;                  /* 24px */
    color: #F2F2F2;
    margin: 0;
    line-height: 1.5rem;
    word-break: break-word;
}

.members-text {
    display: inline-flex;
    align-items: center;
    gap: 0.125rem;                      /* 2px between icon and text */
    font-weight: 400;                   /* Regular */
    font-size: 0.875rem;
    line-height: 0.875rem;
    color: #A7A7A8;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.members-text img {
    width: 1rem;                        /* 16px */
    height: 1rem;                       /* 16px */
    vertical-align: middle;
}

.invited-by {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.invited-label {
    font-weight: 400;                   /* Regular */
    font-size: 0.875rem;                /* 14px */
    color: #A7A7A8;
}

.inviter-avatar {
    width: 1.125rem;                    /* 18px */
    height: 1.125rem;                   /* 18px */
    border-radius: 0.25rem;             /* 4px */
    object-fit: cover;
}

.invited-name {
    font-weight: 400;
    font-size: 0.875rem;
    color: #f2f2f2;
}

.root-launch-text {
    font-size: 1rem;
    line-height: 1rem;
    color: #f2f2f2;
    text-align: center;
}

.launch-container {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
}

.launch-helper-text {
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 0.875rem;
    color: #a7a7a8;
    text-align: center;
    margin-top: 0.75rem;
    margin-bottom: 1.5rem;
}

.accept-button {
    width: 100%;
    height: 3.25rem;                    /* 52px */
    border: none;
    border-radius: 0.75rem;             /* 12px */
    background-color: #3B6AF8;
    color: #F2F2F2;
    font-weight: 500;                   /* Medium */
    font-size: 1rem;                    /* 16px */
    font-family: 'CircularXX', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

button.accept-button:hover,
button.BorderButton:hover {
    opacity: 0.7;
    cursor: pointer;
}

button.accept-button:active,
button.BorderButton:active {
    opacity: 0.5;
    transform: scale(0.98);
}

#launch-button.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.8;
}

#launch-button.loading::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.footer {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: #a7a7a8;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
}

.footer-link {
    color: #f2f2f2;
    text-decoration: underline;
    cursor: pointer;
}

#footer-text.hidden {
    display: none;
}

#download-button {
    display: none;
}

#download-button.visible {
    display: block;
}

#launch-button.hidden {
    display: none;
}

#retry-footer {
    display: none;
}

#retry-footer.visible {
    display: flex;
}
