/* =========================
   FULL BACKGROUND
   ========================= */

.discord-bg {
    position: fixed;
    inset: 0;
    z-index: -10;
    pointer-events: none;
}

.discord-bg img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: opacity .25s ease;
}


/* fallback images */

.discord-bg .bg-light {
    opacity: 1;
}

.discord-bg .bg-dark {
    opacity: 0;
}

body.theme-dark .discord-bg .bg-light {
    opacity: 0;
}

body.theme-dark .discord-bg .bg-dark {
    opacity: 1;
}


/* затемнення */

.discord-bg::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, .25),
            rgba(0, 0, 0, .45)
        );
}

body.theme-light .discord-bg::after {
    background:
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, .30),
            rgba(255, 255, 255, .45)
        );
}


/* =========================
   CENTER LAYOUT
   ========================= */

.discord-wrap {
    min-height: calc(100vh - 80px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px 16px;
}


/* =========================
   GLASS CARD
   ========================= */

.discord-card {
    width: 100%;
    max-width: 520px;

    padding: 34px 32px;

    border-radius: 20px;

    background: rgba(18, 18, 24, .55);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    border: 1px solid rgba(255, 255, 255, .10);

    text-align: center;

    box-shadow:
        0 12px 34px rgba(0, 0, 0, .35);
}

body.theme-light .discord-card {
    background: rgba(255, 255, 255, .65);

    border:
        1px solid rgba(0, 0, 0, .08);
}


/* =========================
   TEXT
   ========================= */

.discord-title {
    font-size: 28px;
    font-weight: 700;

    margin-bottom: 10px;

    color: var(--text, #111);

    text-shadow:
        0 1px 14px rgba(0, 0, 0, .22);
}

.discord-text {
    font-size: 15px;

    margin-bottom: 22px;

    color:
        var(--muted, rgba(0, 0, 0, .65));
}

body.theme-light .discord-title {
    text-shadow:
        0 1px 12px rgba(0, 0, 0, .10);
}


/* =========================
   DISCORD BUTTON
   ========================= */

.discord-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 12px 20px;

    border-radius: 14px;

    font-weight: 600;
    font-size: 15px;

    text-decoration: none;

    color: white;

    background:
        linear-gradient(
            135deg,
            #5865F2,
            #4752c4
        );

    box-shadow:
        0 6px 18px
        rgba(88, 101, 242, .35);

    transition:
        transform .15s ease,
        box-shadow .15s ease,
        filter .15s ease;
}

.discord-btn:hover {
    transform: translateY(-1px);

    filter: brightness(1.05);

    box-shadow:
        0 10px 26px
        rgba(88, 101, 242, .45);
}

.discord-btn:active {
    transform: translateY(0);

    box-shadow:
        0 4px 12px
        rgba(88, 101, 242, .30);
}


/* =========================
   DISCORD ICON
   ========================= */

.discord-icon {
    display: inline-block;

    width: 40px;
    height: 60px;

    flex: 0 0 60px;

    background-color: currentColor;

    -webkit-mask-image:
        url("/static/main_img/icons/discord.svg");

    mask-image:
        url("/static/main_img/icons/discord.svg");

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-size: contain;
    mask-size: contain;
}


/* =========================
   PAGE BACKGROUND FIX
   ========================= */

body.discord-page-active,
body.discord-page-active html {
    background: transparent !important;
}

body.discord-page-active main.site-container,
body.discord-page-active .site-container {
    background: transparent !important;
}


/* additional background overlay */

.discord-bg::after {
    content: "";

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, .18),
            rgba(0, 0, 0, .40)
        );
}

body.theme-light .discord-bg::after {
    background:
        linear-gradient(
            to bottom,
            rgba(255, 255, 255, .18),
            rgba(255, 255, 255, .38)
        );
}


/* =========================
   TOP BACK BUTTON
   ========================= */

.settings-top-links {
    position: fixed;

    top: 18px;
    left: 18px;

    z-index: 20;
}

.top-link-btn {
    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding: 8px 14px;

    border-radius: 999px;

    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    color: var(--text, #111);

    background:
        rgba(255, 255, 255, .75);

    border:
        1px solid rgba(0, 0, 0, .08);

    box-shadow:
        0 6px 18px
        rgba(0, 0, 0, .12);

    transition:
        transform .15s ease,
        box-shadow .15s ease,
        background .15s ease;
}

.top-link-btn:hover {
    transform: translateY(-1px);

    box-shadow:
        0 10px 24px
        rgba(0, 0, 0, .18);
}


/* dark theme */

body.theme-dark .top-link-btn {
    color: #fff;

    background:
        rgba(30, 30, 40, .65);

    border:
        1px solid
        rgba(255, 255, 255, .10);
}


/* =========================
   BACK SVG ICON
   ========================= */

.discord-ui-icon {
    display: inline-block;

    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    background-color: currentColor;

    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-size: contain;
    mask-size: contain;
}

.discord-ui-icon-back {
    -webkit-mask-image:
        url("/static/main_img/icons/back_simple.svg");

    mask-image:
        url("/static/main_img/icons/back_simple.svg");
}