html {
    scrollbar-gutter: stable;
}

:root {
    --pixplay-safe-top: env(safe-area-inset-top, 0px);
    --pixplay-safe-right: env(safe-area-inset-right, 0px);
    --pixplay-safe-bottom: env(safe-area-inset-bottom, 0px);
    --pixplay-safe-left: env(safe-area-inset-left, 0px);
    --pixplay-launch-splash-bg: #1d1f25;
    --pixplay-launch-splash-bg-deep: #15161b;
    --pixplay-launch-splash-accent: rgba(110, 170, 255, 0.18);
    --pixplay-launch-splash-glow: rgba(255, 255, 255, 0.08);
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
}

#pixplay-app-splash {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        calc(var(--pixplay-safe-top) + 24px)
        calc(var(--pixplay-safe-right) + 24px)
        calc(var(--pixplay-safe-bottom) + 24px)
        calc(var(--pixplay-safe-left) + 24px);
    box-sizing: border-box;
    background:
        radial-gradient(circle at 50% 38%, var(--pixplay-launch-splash-accent), transparent 34%),
        linear-gradient(180deg, var(--pixplay-launch-splash-bg) 0%, var(--pixplay-launch-splash-bg-deep) 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .38s ease, visibility .38s ease;
}

#pixplay-app-splash::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03), transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 28%);
    pointer-events: none;
}

html.pixplay-launching #pixplay-app-splash {
    opacity: 1;
    visibility: visible;
}

html.pixplay-splash-fade #pixplay-app-splash {
    opacity: 0;
    visibility: hidden;
}

.pixplay-app-splash__mark {
    position: relative;
    z-index: 1;
    width: clamp(96px, 24vw, 126px);
    height: clamp(96px, 24vw, 126px);
    border-radius: 30px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        inset 0 1px 1px rgba(255, 255, 255, 0.09),
        0 16px 36px rgba(0, 0, 0, 0.28),
        0 0 42px rgba(92, 144, 255, 0.12);
    backdrop-filter: blur(18px) saturate(155%);
    -webkit-backdrop-filter: blur(18px) saturate(155%);
}

.pixplay-app-splash__letter {
    font-family: "SF Pro Display", "Inter", "Segoe UI", sans-serif;
    font-size: clamp(58px, 16vw, 78px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: rgba(245, 248, 255, 0.96);
    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.32),
        0 0 18px rgba(130, 176, 255, 0.16);
    transform: translateY(4px) scale(0.9);
}

html.pixplay-launching .pixplay-app-splash__letter {
    animation: pixplayLaunchPulse 1.05s cubic-bezier(.45, .08, .32, 1) infinite alternate;
}

html.pixplay-standalone,
html.pixplay-standalone body {
    background-color: var(--pixplay-launch-splash-bg);
}

@keyframes pixplayLaunchPulse {
    from {
        transform: translateY(6px) scale(0.9);
        opacity: 0.92;
    }

    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.pixplay-launching .pixplay-app-splash__letter {
        animation: none;
        transform: translateY(0) scale(1);
    }
}

html.pixplay-standalone body {
    padding-top: 0;
    padding-bottom: 0;
}

html.pixplay-standalone header {
    top: 0;
    padding-top: var(--pixplay-safe-top);
    box-sizing: border-box;
}

html.pixplay-standalone .clear-header {
    padding-top: calc(39px + var(--pixplay-safe-top));
}

@media (max-width: 550px) {
    html.pixplay-standalone .clear-header {
        padding-top: calc(35px + var(--pixplay-safe-top));
    }

    html.pixplay-standalone .content-primary {
        padding-bottom: calc(88px + var(--pixplay-safe-bottom));
    }

    html.pixplay-standalone .content-secondary {
        padding-bottom: calc(96px + var(--pixplay-safe-bottom));
    }

    html.pixplay-standalone .mobile-menu-bottom {
        bottom: calc(8px + var(--pixplay-safe-bottom));
    }
}

.mobile-head-notifications {
    display: none;
}

.mobile-service-status {
    display: none;
}

@media (max-width: 550px) {
    .right-secondary {
        display: flex;
        align-items: center;
        gap: 10px;
        float: right;
    }

    .right-secondary > a {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: center;
        min-height: 36px;
        line-height: 0;
    }

    .right-secondary .custom-avatar {
        display: block;
        margin: 0;
    }

    .mobile-head-notifications {
        display: inline-flex;
        position: relative;
        width: 36px;
        height: 36px;
        flex: 0 0 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.04);
        border: 1px solid rgba(255, 255, 255, 0.07);
        box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(10px) saturate(160%);
        -webkit-backdrop-filter: blur(10px) saturate(160%);
        color: rgba(255, 255, 255, 0.86);
    }

    .mobile-head-notifications .bell-icon {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 16px;
        height: 16px;
        display: block;
        transform: translate(-50%, -50%);
        pointer-events: none;
    }

    header .service-status {
        display: none !important;
    }

    .content-secondary {
        padding-top: calc(24px + var(--pixplay-safe-top)) !important;
    }

    .content-secondary .service-status {
        display: flex !important;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
        padding: 0 0 18px 0;
        margin: 0 0 18px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        color: rgba(255, 255, 255, 0.72);
        font-size: 15px;
        line-height: 1.25;
        text-shadow: none;
    }

    .content-secondary .service-status .service-status-arrow {
        margin-left: 8px;
        opacity: 0.58;
        width: 7px;
        height: 7px;
        min-width: 7px;
        min-height: 7px;
        transform: rotate(45deg) translateY(-0.5px);
    }

    .mobile-service-status {
        display: flex !important;
    }
}
