* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --ink: #f7f8ff;
    --line: rgba(239, 242, 246, 0.38);
    --pill: rgba(34, 37, 43, 0.34);
    --field: rgba(7, 10, 17, 0.58);
    --purple: #6037f3;
    --purple-bright: #7b54ff;
}

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

body {
    min-height: 100svh;
    overflow: auto;
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    background-color: #050710;
    background-image:
        linear-gradient(180deg, rgba(3, 6, 16, 0.02), rgba(2, 4, 11, 0.18)),
        url("/assets/arcade-hero-background.png");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

body::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    background:
        radial-gradient(circle at 50% 47%, rgba(92, 65, 228, 0.08), transparent 34%),
        linear-gradient(90deg, rgba(2, 4, 10, 0.12), transparent 26%, transparent 74%, rgba(2, 4, 10, 0.12));
}

.landing-stage {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100svh;
    place-items: center;
    padding: clamp(24px, 6vw, 72px);
}

.login-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    width: min(360px, calc(100% - 32px));
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 24px 22px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background:
        linear-gradient(
            145deg,
            rgba(242, 245, 249, 0.2),
            rgba(112, 116, 124, 0.12) 38%,
            rgba(13, 16, 21, 0.42)
        ),
        var(--pill);
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(255, 255, 255, 0.17) inset,
        0 1px 0 rgba(255, 255, 255, 0.24) inset,
        0 -18px 30px rgba(0, 0, 0, 0.12) inset,
        0 0 46px rgba(214, 219, 230, 0.15);
    -webkit-backdrop-filter: blur(30px) saturate(118%) contrast(106%) brightness(108%);
    backdrop-filter: blur(30px) saturate(118%) contrast(106%) brightness(108%);
}

.login-card::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    background:
        linear-gradient(112deg, rgba(255, 255, 255, 0.17), transparent 24%, transparent 69%, rgba(255, 255, 255, 0.08)),
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.2), transparent 38%);
    content: "";
    pointer-events: none;
    opacity: 0.82;
}

.login-card::after {
    position: absolute;
    top: -44%;
    left: -30%;
    z-index: 0;
    width: 160%;
    height: 72%;
    border-radius: 50%;
    background: linear-gradient(106deg, transparent 34%, rgba(255, 255, 255, 0.13) 49%, transparent 64%);
    content: "";
    filter: blur(18px);
    opacity: 0.68;
    pointer-events: none;
    transform: rotate(-7deg);
}

.login-card > * {
    position: relative;
    z-index: 1;
}

.brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

.logo-image {
    display: block;
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter:
        drop-shadow(0 5px 10px rgba(0, 0, 0, 0.42))
        drop-shadow(0 0 18px rgba(108, 79, 248, 0.24));
}

.logo-sprite-shell {
    position: relative;
    display: grid;
    width: clamp(156px, 12vw, 180px);
    aspect-ratio: 1;
    place-items: center;
    contain: layout paint;
}

.logo-sprite-shell::before {
    position: absolute;
    inset: 18%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(72, 154, 255, 0.26),
        rgba(98, 62, 242, 0.15) 48%,
        transparent 74%
    );
    content: "";
    filter: blur(14px);
    opacity: 0.9;
}

.logo-sprite,
.logo-sprite-frame {
    display: block;
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    filter:
        drop-shadow(0 8px 11px rgba(0, 0, 0, 0.5))
        drop-shadow(0 0 18px rgba(48, 131, 255, 0.24));
    transition: filter 180ms ease;
}

.logo-sprite-frame,
.logo-sprite-shell > [data-active-frame="false"] {
    visibility: hidden;
}

.logo-sprite-shell > [data-active-frame="true"] {
    visibility: visible;
}

.logo-sprite-shell:hover .logo-sprite,
.logo-sprite-shell:hover .logo-sprite-frame {
    filter:
        drop-shadow(0 9px 13px rgba(0, 0, 0, 0.54))
        drop-shadow(0 0 22px rgba(68, 147, 255, 0.32));
}

.creator-only {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.94);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 8px 18px rgba(0, 0, 0, 0.28);
    color: rgba(238, 240, 255, 0.78);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
    white-space: nowrap;
}

.x-logo {
    width: 12px;
    height: 12px;
    fill: rgba(247, 248, 255, 0.94);
}

.creator-handle {
    color: rgba(247, 248, 255, 0.95);
    letter-spacing: 0.03em;
}

.guest-button,
.signin-button {
    display: inline-flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #fff;
    font: inherit;
    font-size: 0.98rem;
    font-weight: 720;
    letter-spacing: -0.018em;
    text-decoration: none;
    white-space: nowrap;
    transition:
        transform 160ms ease,
        filter 160ms ease,
        border-color 160ms ease,
        background 160ms ease;
}

.guest-button {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 0 18px;
    border-color: rgba(154, 135, 255, 0.5);
    background: linear-gradient(135deg, var(--purple), var(--purple-bright));
    box-shadow:
        0 10px 26px rgba(79, 51, 232, 0.33),
        0 0 0 1px rgba(255, 255, 255, 0.11) inset;
}

.guest-button::before {
    position: absolute;
    inset: -170% -28%;
    z-index: 0;
    background: conic-gradient(
        from 120deg,
        transparent 0deg,
        rgba(112, 223, 255, 0.24) 52deg,
        transparent 96deg,
        rgba(255, 135, 213, 0.3) 148deg,
        transparent 202deg,
        rgba(210, 198, 255, 0.3) 268deg,
        transparent 322deg
    );
    content: "";
    filter: blur(24px);
    opacity: 0.42;
    pointer-events: none;
    transform: rotate(-11deg);
    animation: guest-spectrum 4.8s ease-in-out infinite alternate;
}

.guest-button::after {
    position: absolute;
    top: -80%;
    left: -12%;
    z-index: 0;
    width: 48%;
    height: 260%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 201, 255, 0.26), rgba(123, 221, 255, 0.08) 38%, transparent 72%);
    content: "";
    pointer-events: none;
    transform: translateX(-20%);
    animation: guest-glow 4.2s ease-in-out infinite;
}

.guest-label {
    position: relative;
    z-index: 1;
}

@keyframes guest-glow {
    0%,
    100% {
        opacity: 0.24;
        transform: translateX(-20%);
    }

    50% {
        opacity: 0.72;
        transform: translateX(210%);
    }
}

@keyframes guest-spectrum {
    0% {
        transform: translateX(-28%) rotate(-11deg);
    }

    100% {
        transform: translateX(28%) rotate(-11deg);
    }
}

.guest-button:hover,
.guest-button:focus-visible,
.signin-button:hover,
.signin-button:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.guest-button:focus-visible,
.signin-button:focus-visible,
.signin-form input:focus-visible {
    outline: 2px solid rgba(207, 198, 255, 0.95);
    outline-offset: 3px;
}

.signin-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.signin-form input {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 0 15px;
    border: 1px solid rgba(236, 239, 255, 0.24);
    border-radius: 8px;
    outline: none;
    background: var(--field);
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 160ms ease, background 160ms ease;
}

.signin-form input::placeholder {
    color: rgba(228, 233, 250, 0.66);
}

.signin-form input:hover,
.signin-form input:focus {
    border-color: rgba(182, 170, 255, 0.68);
    background: rgba(11, 14, 26, 0.75);
}

.signin-button {
    padding: 0 14px;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(245, 246, 255, 0.89);
    color: #151827;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 980px) {
    .login-card {
        width: min(360px, calc(100% - 32px));
        padding: 22px 18px;
    }
}

@media (max-width: 820px) {
    .login-card {
        width: min(360px, calc(100% - 24px));
        padding: 20px 16px;
    }
}

@media (max-width: 520px) {
    body {
        background-attachment: scroll;
    }

    .login-card {
        gap: 14px;
        padding: 18px 14px;
    }

    .logo-sprite-shell {
        width: 148px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .guest-button::before,
    .guest-button::after {
        animation: none;
    }

}
